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

# 8.117. store_application_name(i_name text)

Function Properties

Language: PLPGSQL

Return Type: text

Set application_name GUC, if possible. Returns NULL if it fails to work.

    declare
    		p_command text;
    begin
    		if exists (select 1 from pg_catalog.pg_settings where name = 'application_name') then
    		   p_command := 'set application_name to '''|| i_name || ''';';
    		   execute p_command;
    		   return i_name;
    		end if;
    		return NULL::text;
    end

Prev | Home | Next
slonyversionpatchlevel() | Up | storelisten(p_receiver integer, p_provider integer, p_origin integer)