Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZwLj-0001KW-HU; Sun, 18 Nov 2012 04:19:15 +0000 Received: from mbx.knossos.net.nz ([202.160.48.10]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZwLe-00037B-MQ; Sun, 18 Nov 2012 04:19:14 +0000 Received: from [10.1.1.3] (60-234-150-59.bitstream.orcon.net.nz [60.234.150.59]) (authenticated bits=0) by mbx.knossos.net.nz (8.14.4/8.14.4) with ESMTP id qAI4J40O025724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 18 Nov 2012 17:19:05 +1300 Message-ID: <50A861B8.4090609@archidevsys.co.nz> Date: Sun, 18 Nov 2012 17:19:04 +1300 From: Gavin Flower Organization: ArchiDevSys User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Phil Sorber CC: pgsql-bugs@postgresql.org, Greg Sabino Mullane , pgsql-general@postgresql.org Subject: Re: Prepared Statement Name Truncation References: <6bbb6151ee8205741a05512bc81d059d@biglumber.com> <50A85EAB.8080306@archidevsys.co.nz> In-Reply-To: Content-Type: multipart/alternative; boundary="------------040502070104060207040804" X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/107 X-Sequence-Number: 34665 This is a multi-part message in MIME format. --------------040502070104060207040804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 18/11/12 17:10, Phil Sorber wrote: > > On Nov 17, 2012 11:06 PM, "Gavin Flower" > > > wrote: > > > > On 18/11/12 16:49, Greg Sabino Mullane wrote: > >> > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: RIPEMD160 > >> > >> > >>> NOTICE: identifier > >>> "this_is_a_really_long_identifier_for_a_prepared_statement_name_ok" > >>> will be truncated to > >>> "this_is_a_really_long_identifier_for_a_prepared_statement_name_" > >>> PREPARE > >> > >> ... > >>> > >>> The ORM could use a shorter identifier, but it supports multiple > backends > >>> and this is probably not something in their test suite. In addition it > >>> actually works! > >> > >> For now. If it really works, then by definition it does not /need/ to > >> be that long, as the truncated version is not blowing things up. > [...] > >>> Set a hard limit and ERROR instead of truncating and NOTICE? > >>> Both? Neither because that would break backward compatibility? > >> > >> My vote is WARNING and bump limit to 128 in 9.3. That's the combo most > >> likely to make dumb applications work better while not breaking > >> existing smart ones. > >> > >> > [...] > > > Would it be appropriate to make it a WARNING in 9.2.2, then increase > the length in 9.3? > > > > Though I still feel I'd like it to be an ERROR, may be a > configuration variable in 9.3 to promote it to an ERROR with WARNING > being the default? > > > > In that case I'd make it ERROR by default and make people override to > WARNING if it breaks things. Otherwise no one will change. > > [...] > How about a WARNING in 9.2.2, and ERROR in 9.3 with a configuration option to downgrade it to WARNING - as well as increasing the max length to 128 to match the standard in 9.3 (I assume the size increase is to drastic for 9.2.x!)? Cheers, Gavin --------------040502070104060207040804 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 18/11/12 17:10, Phil Sorber wrote:

On Nov 17, 2012 11:06 PM, "Gavin Flower" <GavinFlower@archidevsys.co.nz> wrote:
>
> On 18/11/12 16:49, Greg Sabino Mullane wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: RIPEMD160
>>
>>
>>> NOTICE:  identifier
>>> "this_is_a_really_long_identifier_for_a_prepared_statement_name_ok"
>>> will be truncated to
>>> "this_is_a_really_long_identifier_for_a_prepared_statement_name_"
>>> PREPARE
>>
>> ...
>>>
>>> The ORM could use a shorter identifier, but it supports multiple backends
>>> and this is probably not something in their test suite. In addition it
>>> actually works!
>>
>> For now. If it really works, then by definition it does not /need/ to
>> be that long, as the truncated version is not blowing things up.
[...]
>>> Set a hard limit and ERROR instead of truncating and NOTICE?
>>> Both? Neither because that would break backward compatibility?
>>
>> My vote is WARNING and bump limit to 128 in 9.3. That's the combo most
>> likely to make dumb applications work better while not breaking
>> existing smart ones.
>>
>>

[...]

> Would it be appropriate to make it a WARNING in 9.2.2, then increase the length in 9.3?
>
> Though I still feel I'd like it to be an ERROR, may be a configuration variable in 9.3 to promote it to an ERROR with WARNING being the default?
>

In that case I'd make it ERROR by default and make people override to WARNING if it breaks things. Otherwise no one will change.

[...]

How about a WARNING in 9.2.2, and ERROR in 9.3 with a configuration option to downgrade it to WARNING - as well as increasing the max length to 128 to match the standard in 9.3 (I assume the size increase is to drastic for 9.2.x!)?


Cheers,
Gavin
--------------040502070104060207040804--