Re: BUG #13994: Documentation of pg_notify is incorrect.

From: Joe Conway <mail(at)joeconway(dot)com>
To: junkmesend(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13994: Documentation of pg_notify is incorrect.
Date: 2016-02-28 23:43:46
Message-ID: 56D38632.6090405@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 02/28/2016 03:20 PM, junkmesend(at)gmail(dot)com wrote:
> http://www.postgresql.org/docs/9.5/static/sql-notify.html
>
> Recommends the command...
>
> SELECT pg_notify('fo' || 'o', 'pay' || 'load');

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

(1 row)

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

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

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

Joe

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thom Brown 2016-02-29 02:15:54 Server crash with certain encodings
Previous Message David Gould 2016-02-28 23:37:35 Re: BUG #13994: Documentation of pg_notify is incorrect.