Re: BUG #5911: pg_notify() function only works when channel name is lower case - Mailing list pgsql-bugs

From Merlin Moncure
Subject Re: BUG #5911: pg_notify() function only works when channel name is lower case
Date
Msg-id AANLkTi=qi0DXZcDoMy5hHJQGJP5upJPsGKVt+ySh5tmS@mail.gmail.com
Whole thread Raw
In response to BUG #5911: pg_notify() function only works when channel name is lower case  ("Joshua McDougall" <josh@schemaverse.com>)
List pgsql-bugs
On Thu, Mar 3, 2011 at 9:20 AM, Joshua McDougall <josh@schemaverse.com> wro=
te:
>
> The following bug has been logged online:
>
> Bug reference: =A0 =A0 =A05911
> Logged by: =A0 =A0 =A0 =A0 =A0Joshua McDougall
> Email address: =A0 =A0 =A0josh@schemaverse.com
> PostgreSQL version: 9.0.3
> Operating system: =A0 Slackware Linux =A0Kernel =A02.6.28.6
> Description: =A0 =A0 =A0 =A0pg_notify() function only works when channel =
name is
> lower case
> Details:
>
> When using the pg_notify(text,text) function, the channel name MUST be lo=
wer
> case otherwise the message does not go through.
>
> So, while this will work:
>
> LISTEN ERRORCHANNEL;
> NOTIFY ERRORCHANNEL, 'something!';
> NOTIFY eRrorChanNel, 'something!';
>
> this will not:
> SELECT pg_notify('ERRORCHANNEL','something!');
>
> You must use:
> SELECT pg_notify('errorchannel','something!');

not a bug. you have to double quote relnames (listen "Test"). if you
want the server not to case fold them. pg_notify takes a string, not a
relname, which uses different rules.

merlin

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Problem with ALTER TABLE - occasional "tuple concurrently updated"
Next
From: Tom Lane
Date:
Subject: Re: BUG #5911: pg_notify() function only works when channel name is lower case