Re: (libpq) listen/notify messages are converted to

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: (libpq) listen/notify messages are converted to
Date: 2004-08-15 18:51:20
Message-ID: 20040815114830.B86649@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sun, 15 Aug 2004, Frank van Vugt wrote:

> L.S.
>
> Either the docs or I are missing something....
>
> While using libpq I noticed that listen/notify calls were being converted to
> lowercase. A further look showed that the listen/notify calls seem to be
> totally case insensitive:
>
> free4testing=# select version();
> version
> ---------------------------------------------------------------------
> PostgreSQL 7.4.3 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66
>
> free4testing=# listen barcode_needed;
> LISTEN
> free4testing=# notify BARCODE_NEEDED;
> NOTIFY
> Asynchronous notification "barcode_needed" received from server process with
> PID 32638.
> free4testing=# unlisten BARCODE_NEEDED;
> UNLISTEN
> free4testing=#
>
>
> Obviously, things work and they probably work as intended, but I wasn't able
> to find anything on this behaviour in the docs. For a moment I thought that
> the syntax rule 'unquoted letters are forced to lowercase' of SQL applied
> here as well, but any double quotes used are simply interpreted as part of
> the name.

On my 7.4.2 machine, I can get:

sszabo=# listen foo;
LISTEN
sszabo=# notify "FOO";
NOTIFY
sszabo=# notify "foo";
NOTIFY
Asynchronous notification "foo" received from server process with PID
7042.
sszabo=# notify FOO;
NOTIFY
Asynchronous notification "foo" received from server process with PID
7042.

So, it looks to me that "FOO" is not being casefolded while FOO is, which
would be consistent with the identifier folding rules.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-08-15 18:54:00 Re: case insensitive search with greek characters
Previous Message Tom Lane 2004-08-15 18:50:43 Re: pl/pgsql trigger table attributes