pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Edwards <jedwards@fastmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15558: NOTIFY max channel length is undocumented
Date: Tue, 18 Dec 2018 19:28:32 -0600
Message-ID: <1545182912.1800865.1613067232.46581146@webmail.messagingengine.com> (raw)
In-Reply-To: <CAKFQuwar0TStiq7T45uZGRg6JXpkpy8rMZ4r5ZXVu4q5oeaqCg@mail.gmail.com>
References: <15558-996f38aafa654215@postgresql.org>
	<CAKFQuwar0TStiq7T45uZGRg6JXpkpy8rMZ4r5ZXVu4q5oeaqCg@mail.gmail.com>

Oh, that's a good point.  Do you think a hyperlink like the following might be an improvement?

channel
      Name of the notification channel to be signaled (any <a href="https://www.postgresql.org/docs/11/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS">identifier...;)

If there had been a hyperlink I believe I might have clicked it and found this out sooner.

On Tue, Dec 18, 2018, at 6:57 PM, David G. Johnston wrote:
> On Tue, Dec 18, 2018 at 5:36 PM PG Bug reporting form
> <noreply@postgresql.org> wrote:
> >
> > The following bug has been logged on the website:
> >
> > Bug reference:      15558
> > Logged by:          Andy Edwards
> > Email address:      jedwards@fastmail.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.




view thread (3+ messages)

Message-ID: <1545182912.1800865.1613067232.46581146@webmail.messagingengine.com>
Permalink:  ../1545182912.1800865.1613067232.46581146@webmail.messagingengine.com/
Also on:    postgresql.org/message-id/1545182912.1800865.1613067232.46581146@webmail.messagingengine.com

 · 

reply

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: jedwards@fastmail.com, david.g.johnston@gmail.com
  Subject: Re: BUG #15558: NOTIFY max channel length is undocumented
  In-Reply-To: <1545182912.1800865.1613067232.46581146@webmail.messagingengine.com>
  References: <15558-996f38aafa654215@postgresql.org> <CAKFQuwar0TStiq7T45uZGRg6JXpkpy8rMZ4r5ZXVu4q5oeaqCg@mail.gmail.com> <1545182912.1800865.1613067232.46581146@webmail.messagingengine.com>

* 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