Re: BUG #15558: NOTIFY max channel length is undocumented

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: jedwards(at)fastmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15558: NOTIFY max channel length is undocumented
Date: 2018-12-19 00:57:12
Message-ID: CAKFQuwar0TStiq7T45uZGRg6JXpkpy8rMZ4r5ZXVu4q5oeaqCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Dec 18, 2018 at 5:36 PM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 15558
> Logged by: Andy Edwards
> Email address: jedwards(at)fastmail(dot)com
> PostgreSQL version: 11.1
> Operating system: (irrelevant)
> Description:
>
> After debugging why notifications weren't getting delivered, I discovered
> the following:
>
> # LISTEN "pg/tables/TagNotificationTriggers/tag/_org/1/JSON
> Test/battery/1/lifetimeWh";
> NOTICE: identifier "pg/tables/TagNotificationTriggers/tag/_org/1/JSON
> Test/battery/1/lifetimeWh" will be truncated to
> "pg/tables/TagNotificationTriggers/tag/_org/1/JSON Test/battery/"
>
> I haven't seen a mention of this channel length limit in any version of the
> documentation for NOTIFY. I wish it were in the documentation, because then
> I would have found out about this limit before deciding to use Postgres
> notifications, and chosen to use Redis notifications from the beginning.

Since it is just another name/identifier it is the same limit and
behavior as is present for table names, column names, type names,
etc...

The length of identifiers is covered in the general section covering syntax:

https://www.postgresql.org/docs/11/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

Default length for identifiers is identified as being 63 bytes -
though technically (but not usefully) is system dependent at compile
time.

It is intentional to not spam the documentation with such a
wide-ranging dynamic everywhere it might come into play...I'm
undecided whether NOTIFY is deserving of an exception...

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-12-19 01:05:23 BUG #15559: erro na instalação do postgree
Previous Message Amit Langote 2018-12-19 00:44:42 Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction