From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joshua McDougall <josh@schemaverse.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5911: pg_notify() function only works when channel name is lower case
Date: Thu, 03 Mar 2011 11:24:53 -0500
Message-ID: <9171.1299169493@sss.pgh.pa.us> (raw)
In-Reply-To: <201103031520.p23FKxFJ049037@wwwmaster.postgresql.org>
References: <201103031520.p23FKxFJ049037@wwwmaster.postgresql.org>
"Joshua McDougall" <josh@schemaverse.com> writes:
> When using the pg_notify(text,text) function, the channel name MUST be lower
> case otherwise the message does not go through.
It's not clear to me that this is a bug. The argument of NOTIFY is a
SQL identifier, which is folded to lower case by the lexer if not
double-quoted, but the argument of pg_notify is a string constant which
is a different matter altogether.
We could have pg_notify lowercase its argument at runtime, but then
we'd have to introduce quoting rules, so that you could do
select pg_notify('"IntentionallyMixedCase"', '...');
This isn't a lot clearer than the current behavior, and it definitely
wouldn't be backwards compatible. So I'm inclined to leave it alone.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, josh@schemaverse.com
Subject: Re: BUG #5911: pg_notify() function only works when channel name is lower case
In-Reply-To: <9171.1299169493@sss.pgh.pa.us>
References: <201103031520.p23FKxFJ049037@wwwmaster.postgresql.org> <9171.1299169493@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox