Notiffy problem - Mailing list pgsql-general

From adasko98
Subject Notiffy problem
Date
Msg-id 1340956904624-5714744.post@n5.nabble.com
Whole thread Raw
Responses Re: Notiffy problem  (Richard Huxton <dev@archonet.com>)
List 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.

pgsql-general by date:

Previous
From: raghu ram
Date:
Subject: Re: function lookup using a "real" function call
Next
From: Atri Sharma
Date:
Subject: Regarding parallel running of 9.1 and 9.2beta2