Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 09E341337B61 for ; Thu, 3 Mar 2011 12:25:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 66360-09 for ; Thu, 3 Mar 2011 16:24:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 4BA1D1337B43 for ; Thu, 3 Mar 2011 12:24:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p23GOrCO009172; Thu, 3 Mar 2011 11:24:53 -0500 (EST) To: "Joshua McDougall" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5911: pg_notify() function only works when channel name is lower case In-reply-to: <201103031520.p23FKxFJ049037@wwwmaster.postgresql.org> References: <201103031520.p23FKxFJ049037@wwwmaster.postgresql.org> Comments: In-reply-to "Joshua McDougall" message dated "Thu, 03 Mar 2011 15:20:59 +0000" Date: Thu, 03 Mar 2011 11:24:53 -0500 Message-ID: <9171.1299169493@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/47 X-Sequence-Number: 29557 "Joshua McDougall" 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