pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@2ndQuadrant.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Phil Sorber <phil@omniti.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Prepared Statement Name Truncation
Date: Tue, 20 Nov 2012 09:23:54 +0800
Message-ID: <50AADBAA.2030104@2ndQuadrant.com> (raw)
In-Reply-To: <20121119134345.GK5162@tamriel.snowman.net>
References: <CADAkt-hGbxM6QXrPDR=f+VV1PEABLf+i8eu71VSR_vBg5r=P=Q@mail.gmail.com>
	<23706.1353223982@sss.pgh.pa.us>
	<CADAkt-h6WGZxunpXz2H+LoXHKDtR=0yKcWcDO=MKYRJApxEw8A@mail.gmail.com>
	<18330.1353283998@sss.pgh.pa.us>
	<20121119134345.GK5162@tamriel.snowman.net>

On 11/19/2012 09:43 PM, Stephen Frost wrote:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> Let me be clear here: I don't think we can or should ever make this
>> into an error by default. Doing that would break spec-compliant
>> applications, whether or not they are using names that actually have
>> any conflicts.
>
> If we increase the length to the spec requirement (full disclosure- I
> havn't checked the spec on this myself), I'd be for making it an error
> if someone goes over that limit. Right now we have a risk of spec
> compliant applications not working under PG for nearly zero good
> justification in today's age (iow- I don't really buy the concern about
> the size, and if that is a reasonable concern then we could look at
> putting in the effort to make it variable length and seriously reduce
> today's wasted space).
Wasted space is only part of the issue; it's also potentially
significantly cheaper to compare and copy fixed length names, especially
when you can copy on-stack arrays rather than palloc'ing memory.

I have not checked to see whether this is a concern in Pg's codebase;
I'm just aware it's been a reason for the use of fixed length strings in
software in general.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

view thread (23+ messages)  latest in thread

Message-ID: <50AADBAA.2030104@2ndQuadrant.com>
Permalink:  ../50AADBAA.2030104@2ndQuadrant.com/
Also on:    postgresql.org/message-id/50AADBAA.2030104@2ndQuadrant.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: craig@2ndQuadrant.com, sfrost@snowman.net, tgl@sss.pgh.pa.us, phil@omniti.com
  Subject: Re: Prepared Statement Name Truncation
  In-Reply-To: <50AADBAA.2030104@2ndQuadrant.com>
  References: <CADAkt-hGbxM6QXrPDR=f+VV1PEABLf+i8eu71VSR_vBg5r=P=Q@mail.gmail.com> <23706.1353223982@sss.pgh.pa.us> <CADAkt-h6WGZxunpXz2H+LoXHKDtR=0yKcWcDO=MKYRJApxEw8A@mail.gmail.com> <18330.1353283998@sss.pgh.pa.us> <20121119134345.GK5162@tamriel.snowman.net> <50AADBAA.2030104@2ndQuadrant.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