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
LISTEN(7) PostgreSQL 9.2.7 Documentation LISTEN(7)NAME
LISTEN - listen for a notification
SYNOPSIS
LISTEN channel
DESCRIPTION
LISTEN registers the current session as a listener on the notification channel named channel. If the current session is already registered
as a listener for this notification channel, nothing is done.
Whenever the command NOTIFY channel is invoked, either by this session or another one connected to the same database, all the sessions
currently listening on that notification channel are notified, and each will in turn notify its connected client application.
A session can be unregistered for a given notification channel with the UNLISTEN command. A session's listen registrations are
automatically cleared when the session ends.
The method a client application must use to detect notification events depends on which PostgreSQL application programming interface it
uses. With the libpq library, the application issues LISTEN as an ordinary SQL command, and then must periodically call the function
PQnotifies to find out whether any notification events have been received. Other interfaces such as libpgtcl provide higher-level methods
for handling notify events; indeed, with libpgtcl the application programmer should not even issue LISTEN or UNLISTEN directly. See the
documentation for the interface you are using for more details.
NOTIFY(7) contains a more extensive discussion of the use of LISTEN and NOTIFY.
PARAMETERS
channel
Name of a notification channel (any identifier).
NOTES
LISTEN takes effect at transaction commit. If LISTEN or UNLISTEN is executed within a transaction that later rolls back, the set of
notification channels being listened to is unchanged.
A transaction that has executed LISTEN cannot be prepared for two-phase commit.
EXAMPLES
Configure and execute a listen/notify sequence from psql:
LISTEN virtual;
NOTIFY virtual;
Asynchronous notification "virtual" received from server process with PID 8448.
COMPATIBILITY
There is no LISTEN statement in the SQL standard.
SEE ALSO NOTIFY(7), UNLISTEN(7)PostgreSQL 9.2.7 2014-02-17 LISTEN(7)
I am comparing text files where there are number of rows of numbers from window to unix box
Is there any way of checking lets say 4 document of text file
and seeing the difference only (or missing rows of numbers)
with simple commands with lets say a batch file
FROM ABSOULTE... (2 Replies)
Hi,
I am using the NOTIFY command and I am getting the emails.. I tried MAILX and e-mail is being sent. I want to use NOTIFY to see if my jobs are completed or not. Am I missing something..
All your ideas are greatly appreciated..
Thanks
Venky (2 Replies)
how to insert a extra line in a text file using a sh command
iam trying to think of a way to add a extra line but without deleting the whole text
do anyone have any ideas (2 Replies)
Hi,
I wanted to add specific text to each row in a text file containing three rows. Example:
0 8 7 6 5 5
7 8 9 0 7 9
7 8 9 0 1 2
And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this:
21 0 8 7 6 5 5
7 8... (4 Replies)
I am new to scripting and I needed to know if there would be an easy way to delete extra spaces in a text file. I have a file with three rows with 22 numbers each, but there is extra spaces between the numbers when it gets output by this program AFNI that I am using. What script would help delete... (2 Replies)
I have a requirement where i have to read from a .sh file a text lying bet characters like 'SELECT' & ';'...Please help me out in this. I am new to shell scripting. (2 Replies)
Hi all,
I have a requirement where i have to search data between strings 'SELECT' and ';' and replace this text as "SELECT.....;" so that i can export this extracted string into a excel cell.
Please suggest on this. (5 Replies)
just a quick question:
a. whats the simplest command to check open port and the corresponding services?
example:
bash-2.05# netstat -an | grep LISTEN
*.199 *.* 0 0 49152 0 LISTEN
*.8989 *.* 0 0 49152 ... (1 Reply)
Input:
some random text SELECT TABLE1 some more random text
some random text SELECT TABLE2 some more random text
some random text SELECT TABLE3 some more random text
some random text SELECT TABLE1 some more random text
Output:
'SELECT TABLE1' 2
'SELECT TABLE2' 1
'SELECT TABLE3' 1
I... (5 Replies)
Hello,
I am currently monitoring about 40 hosts using NsClient. Each host has between 5-8 services running on each of them. I was trying to find a way to get less notifications because I'm currently getting about 200 a week. Is there anyway for if one service goes down on a host to make nagios... (5 Replies)
I need to sum values in text file in case duplicate row are present with same name and different value below is example of data in file i have and format i need.
Data in text file
20170308
PM,U,2
PM,U,1
PM,U, 113
PM,I,123
PM,U,123
DA,U 135
DA,I,113
DA,I,1
DA,U,22
20170309
PM,U,2... (6 Replies)