Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dblink_get_notify(3) [centos man page]

DBLINK_GET_NOTIFY(3)					  PostgreSQL 9.2.7 Documentation				      DBLINK_GET_NOTIFY(3)

NAME
dblink_get_notify - retrieve async notifications on a connection SYNOPSIS
dblink_get_notify() returns setof (notify_name text, be_pid int, extra text) dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, extra text) DESCRIPTION
dblink_get_notify retrieves notifications on either the unnamed connection, or on a named connection if specified. To receive notifications via dblink, LISTEN must first be issued, using dblink_exec. For details see LISTEN(7) and NOTIFY(7). ARGUMENTS
conname The name of a named connection to get notifications on. RETURN VALUE
Returns setof (notify_name text, be_pid int, extra text), or an empty set if none. EXAMPLES
SELECT dblink_exec('LISTEN virtual'); dblink_exec ------------- LISTEN (1 row) SELECT * FROM dblink_get_notify(); notify_name | be_pid | extra -------------+--------+------- (0 rows) NOTIFY virtual; NOTIFY SELECT * FROM dblink_get_notify(); notify_name | be_pid | extra -------------+--------+------- virtual | 1229 | (1 row) PostgreSQL 9.2.7 2014-02-17 DBLINK_GET_NOTIFY(3)

Check Out this Related Man Page

DBLINK_EXEC(3)						  PostgreSQL 9.2.7 Documentation					    DBLINK_EXEC(3)

NAME
dblink_exec - executes a command in a remote database SYNOPSIS
dblink_exec(text connname, text sql [, bool fail_on_error]) returns text dblink_exec(text connstr, text sql [, bool fail_on_error]) returns text dblink_exec(text sql [, bool fail_on_error]) returns text DESCRIPTION
dblink_exec executes a command (that is, any SQL statement that doesn't return rows) in a remote database. When two text arguments are given, the first one is first looked up as a persistent connection's name; if found, the command is executed on that connection. If not found, the first argument is treated as a connection info string as for dblink_connect, and the indicated connection is made just for the duration of this command. ARGUMENTS
conname Name of the connection to use; omit this parameter to use the unnamed connection. connstr A connection info string, as previously described for dblink_connect. sql The SQL command that you wish to execute in the remote database, for example insert into foo values(0,'a','{"a0","b0","c0"}'). fail_on_error If true (the default when omitted) then an error thrown on the remote side of the connection causes an error to also be thrown locally. If false, the remote error is locally reported as a NOTICE, and the function's return value is set to ERROR. RETURN VALUE
Returns status, either the command's status string or ERROR. EXAMPLES
SELECT dblink_connect('dbname=dblink_test_standby'); dblink_connect ---------------- OK (1 row) SELECT dblink_exec('insert into foo values(21,''z'',''{"a0","b0","c0"}'');'); dblink_exec ----------------- INSERT 943366 1 (1 row) SELECT dblink_connect('myconn', 'dbname=regression'); dblink_connect ---------------- OK (1 row) SELECT dblink_exec('myconn', 'insert into foo values(21,''z'',''{"a0","b0","c0"}'');'); dblink_exec ------------------ INSERT 6432584 1 (1 row) SELECT dblink_exec('myconn', 'insert into pg_class values (''foo'')',false); NOTICE: sql error DETAIL: ERROR: null value in column "relnamespace" violates not-null constraint dblink_exec ------------- ERROR (1 row) PostgreSQL 9.2.7 2014-02-17 DBLINK_EXEC(3)
Man Page