Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5TElAa89573 for ; Fri, 29 Jun 2001 10:47:11 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f5TEkrF07299; Fri, 29 Jun 2001 10:46:54 -0400 (EDT) To: "Jeff Boes" cc: pgsql-sql@postgresql.org Subject: Re: NOTIFY "string" from rule In-reply-to: <9h05l0$1bke$1@news.tht.net> References: <9h05l0$1bke$1@news.tht.net> Comments: In-reply-to "Jeff Boes" message dated "Fri, 22 Jun 2001 15:18:31 -0400" Date: Fri, 29 Jun 2001 10:46:53 -0400 Message-ID: <7296.993826013@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/470 X-Sequence-Number: 3773 "Jeff Boes" 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