29 Jun 2012 10:01
Notiffy problem
adasko98 <adasko.86 <at> gmail.com>
2012-06-29 08:01:44 GMT
2012-06-29 08:01:44 GMT
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$
(Continue reading)
RSS Feed