Notiffy problem

From: adasko98 <adasko(dot)86(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Notiffy problem
Date: 2012-06-29 08:01:44
Message-ID: 1340956904624-5714744.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi
In first sorry for my english :) I have got a problem with notify/listener.
I do a function which returns a trigger. Everything is ok but when i want
send in a second parameter a variable NOTIFY say: "syntax error"

This is works example with no variable:
CREATE OR REPLACE FUNCTION notify_demo()
RETURNS trigger AS
$BODY$
DECLARE
BEGIN
Notify demoApp, 'some text';
RETURN null;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;

This is example with variable (not work):
CREATE OR REPLACE FUNCTION notify_demo()
RETURNS trigger AS
$BODY$
DECLARE
n_user text;
BEGIN
n_user :='sda';
Notify demoApp, n_user ; <----here is a problem
RETURN null;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Notiffy-problem-tp5714744.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Atri Sharma 2012-06-29 08:17:25 Regarding parallel running of 9.1 and 9.2beta2
Previous Message Patrick Schneider 2012-06-29 07:54:23 Conversion of columns during CSV Import