pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: junkmesend@gmail.com
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #13994: Documentation of pg_notify is incorrect.
Date: Sun, 28 Feb 2016 15:43:46 -0800
Message-ID: <56D38632.6090405@joeconway.com> (raw)
In-Reply-To: <20160228232040.10551.18290@wrigleys.postgresql.org>
References: <20160228232040.10551.18290@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 02/28/2016 03:20 PM, junkmesend@gmail.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

Attachments:

  signature.asc (application/pgp-signature, 835B) download

view thread (3+ messages)

Message-ID: <56D38632.6090405@joeconway.com>
Permalink:  ../56D38632.6090405@joeconway.com/
Also on:    postgresql.org/message-id/56D38632.6090405@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mail@joeconway.com, junkmesend@gmail.com
  Subject: Re: BUG #13994: Documentation of pg_notify is incorrect.
  In-Reply-To: <56D38632.6090405@joeconway.com>
  References: <20160228232040.10551.18290@wrigleys.postgresql.org> <56D38632.6090405@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox