select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Unsupported versions: 7.3 / 7.2 / 7.1
Historical version. PostgreSQL 7.2 reached end of support in February 2007. See the current manual for supported releases.

getnotify

Name

getnotify -- gets the last notify from the server

Synopsis

getnotify()

Parameters

none

Return Type

tuple, None

Last notify from server

Exceptions

TypeError

Too many (any) arguments.

pg.error

Invalid connection.

Description

getnotify() method tries to get a notify from the server (from the SQL statement NOTIFY). If the server returns no notify, the methods returns None. Otherwise, it returns a tuple (couple) (relname, pid), where relname is the name of the notify and pid the process id of the connection that triggered the notify. Remember to do a listen query first otherwise getnotify will always return None.

Report a documentation issue

Read the upstream documentation. For corrections, first check the current manual.