Slony-I 2.2.11 Documentation
Prev | Fast Backward | Chapter 8. Schema schemadoc | Fast Forward | Next

# 8.91. registry_set_timestamp(p_value text, p_key timestamp with time zone)

Function Properties

Language: PLPGSQL

Return Type: timestamp without time zone

registry_set_timestamp(key, value) Set or delete a registry value

    BEGIN
    	if p_value is null then
    		delete from sl_registry
    				where reg_key = p_key;
    	else
    		lock table sl_registry;
    		update sl_registry
    				set reg_timestamp = p_value
    				where reg_key = p_key;
    		if not found then
    			insert into sl_registry (reg_key, reg_timestamp)
    					values (p_key, p_value);
    		end if;
    	end if;
    	return p_value;
    END;

Prev | Home | Next
registry_set_text(p_value text, p_key text) | Up | repair_log_triggers(only_locked boolean)