pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Sabino Mullane <greg@turnstep.com>
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Prepared Statement Name Truncation
Date: Sun, 18 Nov 2012 02:24:03 -0500
Message-ID: <23546.1353223443@sss.pgh.pa.us> (raw)
In-Reply-To: <6bbb6151ee8205741a05512bc81d059d@biglumber.com>
References: <6bbb6151ee8205741a05512bc81d059d@biglumber.com>

"Greg Sabino Mullane" <greg@turnstep.com> writes:
>> If it's a postgres bug, what is the fix? Make the identifier max size
>> longer?

> I'd also be in favor of this, in addition to upgrading from a NOTICE.

Increasing NAMEDATALEN has been discussed, and rejected, before.  It
is very very far from being a free change: it would double the storage
space required for "name" columns, which is a sizable fraction of the
space eaten in the pg_class and pg_attribute catalogs.  (Or we could
convert "name" to a variable length type, but the fallout from that
would vastly exceed what this feature seems worth.)

I think there probably is some case for treating overlength names as
errors not warnings, but on the other hand there's a case for fearing
this will break applications that work fine today.  In particular, it
would break applications that expect to be able to use spec-compliant
128-character names, *whether or not they actually have any collisions*.
That seems pretty undesirable, especially in view of the fact that
duplicate-name checks would catch any actual collisions in most cases.

Another point here is that appealing to the letter of the spec in this
area is a bit dubious anyway given the number of ways in which we vary
from exact spec compliance --- notably, allowing non-ASCII characters in
identifiers, allowing dollar signs, allowing leading underscore (no,
that's not per spec), folding to lower case not upper case.

On the whole I'm not too excited about changing this.

			regards, tom lane




view thread (23+ messages)  latest in thread

Message-ID: <23546.1353223443@sss.pgh.pa.us>
Permalink:  ../23546.1353223443@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23546.1353223443@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, greg@turnstep.com, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Prepared Statement Name Truncation
  In-Reply-To: <23546.1353223443@sss.pgh.pa.us>
  References: <6bbb6151ee8205741a05512bc81d059d@biglumber.com> <23546.1353223443@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