Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] Oracle buys

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Dann Corbit <DCorbit(at)connx(dot)com>, Richard_D_Levine(at)raytheon(dot)com, pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] Oracle buys
Date: 2005-10-19 20:04:37
Message-ID: 1129752277.18052.130.camel@Andrea.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Am Mittwoch, den 19.10.2005, 16:29 -0300 schrieb Marc G. Fournier:
> I'm CC'ng this over to -hackers ... Tom? Comments?
>
> On Wed, 19 Oct 2005, Dann Corbit wrote:
>
> > Yes, clearly that is the wrong result according to the SQL standard.
> >
> > Here is a SQL*Server query:
> > select 1 where 'a' = 'a ' AND 'a' = 'a ' AND 'a ' = 'a '
> >
> > It returns (correctly): 1
> >
> >> -----Original Message-----
> >> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> >> owner(at)postgresql(dot)org] On Behalf Of Marc G. Fournier
> >> Sent: Wednesday, October 19, 2005 11:41 AM
> >> To: Richard_D_Levine(at)raytheon(dot)com
> >> Cc: pgsql-general(at)postgresql(dot)org
> >> Subject: Re: [pgsql-advocacy] [GENERAL] Oracle buys Innobase
> >>
> >> On Wed, 19 Oct 2005, Richard_D_Levine(at)raytheon(dot)com wrote:
> >>
> >>> I was referring to trailing blanks, but did not explicitly say it,
> >>> though showed it in the examples. I am pretty sure that the SQL
> >>> standard says that trailing whitespace is insignificant in string
> >>> comparison.
> >>
> >> Then we are broken too :)
> >>
> >> # select 'a ' = 'a ';
> >> ?column?
> >> ----------
> >> f
> >> (1 row)

experiment=# SELECT 'a '::char = 'a '::char;
?column?
----------
t

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ledina Hido 2005-10-19 20:05:08 Re: Reverse engineering SW
Previous Message Dann Corbit 2005-10-19 19:59:31 Re: [pgsql-advocacy] Oracle buys Innobase

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2005-10-19 20:16:23 Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] Oracle buysInnobase)
Previous Message Josh Berkus 2005-10-19 20:03:21 Re: A costing analysis tool