agora inbox for pgsql-bugs@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Charles O'Farrell <charleso@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Substring auto trim
Date: Wed, 13 Jan 2010 12:14:07 -0500
Message-ID: <14774.1263402847@sss.pgh.pa.us> (raw)
In-Reply-To: <4B4D9A0F020000250002E432@gw.wicourts.gov>
References: <65d71e1c1001130102j5f46299cm87477efcfd0c5a51@mail.gmail.com>
<65d71e1c1001130102j5f46299cm87477efcfd0c5a51@mail.gmail.com>
<10878.1263396935@sss.pgh.pa.us>
<4B4D9A0F020000250002E432@gw.wicourts.gov>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What's the data type of the value being compared to? I get, for
>> instance,
>>
>> postgres=# select substr('ab '::char(4), 1, 4) = 'ab '::char(4);
> This looks like another situation where we're running into trouble
> because of non-standard behavior when people might be expecting
> something consistent with other products and the explicit language
> in the standard.
If we were to change that so that 'ab ' were implicitly typed as
char(4), then we'd start getting bug reports from people complaining
that "select 'ab' = 'ab '" yields true. I remain of the opinion that
char(n) is so hopelessly brain-damaged that we should be very careful
to NOT bring it into our mainstream behavior.
regards, tom lane
view thread (10+ messages) latest in thread
Message-ID: <14774.1263402847@sss.pgh.pa.us>
Permalink: ../14774.1263402847@sss.pgh.pa.us/
Also on: postgresql.org/message-id/14774.1263402847@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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov, charleso@gmail.com
Subject: Re: Substring auto trim
In-Reply-To: <14774.1263402847@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox