Re: BUG #13994: Documentation of pg_notify is incorrect. - Mailing list pgsql-bugs

From Joe Conway
Subject Re: BUG #13994: Documentation of pg_notify is incorrect.
Date
Msg-id 56D38632.6090405@joeconway.com
Whole thread Raw
In response to BUG #13994: Documentation of pg_notify is incorrect.  (junkmesend@gmail.com)
List pgsql-bugs
On 02/28/2016 03:20 PM, junkmesend@gmail.com wrote:
> http://www.postgresql.org/docs/9.5/static/sql-notify.html
>=20
> Recommends the command...
>=20
> SELECT pg_notify('fo' || 'o', 'pay' || 'load');

Which works fine:
postgres=3D# SELECT pg_notify('fo' || 'o', 'pay' || 'load');
 pg_notify
-----------

(1 row)

> PERFORM pg_notify('fo' || 'o', 'pay' || 'load');
>=20
> does work, as explained here.
>=20
> http://stackoverflow.com/questions/5412474/using-pg-notify-in-postgresql-=
trigger-function?lq=3D1

You are confusing SQL statement syntax with PL/pgSQL function syntax. See:

http://www.postgresql.org/docs/9.5/static/plpgsql-statements.html#PLPGSQL-S=
TATEMENTS-SQL-NORESULT

Joe

--=20
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

pgsql-bugs by date:

Previous
From: David Gould
Date:
Subject: Re: BUG #13994: Documentation of pg_notify is incorrect.
Next
From: Thom Brown
Date:
Subject: Server crash with certain encodings