From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Boes <jboes@nexcerpt.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: NOTIFY "string" from rule
Date: Fri, 29 Jun 2001 10:46:53 -0400
Message-ID: <7296.993826013@sss.pgh.pa.us> (raw)
In-Reply-To: <9h05l0$1bke$1@news.tht.net>
References: <9h05l0$1bke$1@news.tht.net>
"Jeff Boes" <jboes@nexcerpt.com> writes:
> CREATE FUNCTION bar(foo) RETURNS TEXT AS
> 'SELECT $1.status || ''_'' || $1.name;'
> LANGUAGE 'sql';
> and then change the last line of the rule to
> NOTIFY bar(new);
> but no luck.
AFAIK the only way to do NOTIFY with a computed name is to write a
function in plpgsql or pltcl that computes a string 'NOTIFY whatever'
and then EXECUTEs that string. There's no equivalent functionality
in SQL-language functions.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, jboes@nexcerpt.com
Subject: Re: NOTIFY "string" from rule
In-Reply-To: <7296.993826013@sss.pgh.pa.us>
* 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