Re: BUG #5911: pg_notify() function only works when channel name is lower case

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Joshua McDougall <josh(at)schemaverse(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5911: pg_notify() function only works when channel name is lower case
Date: 2011-03-03 16:22:16
Message-ID: AANLkTi=qi0DXZcDoMy5hHJQGJP5upJPsGKVt+ySh5tmS@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Mar 3, 2011 at 9:20 AM, Joshua McDougall <josh(at)schemaverse(dot)com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5911
> Logged by:          Joshua McDougall
> Email address:      josh(at)schemaverse(dot)com
> PostgreSQL version: 9.0.3
> Operating system:   Slackware Linux  Kernel  2.6.28.6
> Description:        pg_notify() function only works when channel name is
> lower case
> Details:
>
> When using the pg_notify(text,text) function, the channel name MUST be lower
> 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

In response to

Browse pgsql-bugs by date

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