Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-21 Thread Rick Morris
Richard Huxton wrote: Dann Corbit wrote: I can see plenty of harm and absolutely no return. We are talking about blank padding before comparison. Do you really want 'Danniel ' considered distinct from 'Danniel ' in a comparison? In real life, what does that buy you? 100% YES! If two va

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL]

2005-10-20 Thread Kevin Grittner
Dann Corbit wrote: > Try this query in Oracle, SQL*Server, DB/2, Informix, etc.: > > connxdatasync=# select 1 where cast('a' as varchar(30)) = cast('a ' as > varchar(30)); > ?column? > -- > (0 rows) For what it's worth, on Sybase ASE I get: --- 1 (1 row aff

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

2005-10-20 Thread Guy Rouillier
Tino Wildenhain wrote: Then we are broken too :) # select 'a ' = 'a '; ?column? -- f (1 row) > > > experiment=# SELECT 'a '::char = 'a '::char; > ?column? > -- > t > This does't show anything useful, because the ::char casting s

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-20 Thread Terry Fielder
Dann Corbit wrote: Try this query in Oracle, SQL*Server, DB/2, Informix, etc.: connxdatasync=# select 1 where cast('a' as varchar(30)) = cast('a ' as varchar(30)); ?column? -- (0 rows) I see how you can interpret the SQL Standard to make the above response a correct one. But is it t

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-20 Thread Richard Huxton
Dann Corbit wrote: I can see plenty of harm and absolutely no return. We are talking about blank padding before comparison. Do you really want 'Danniel ' considered distinct from 'Danniel ' in a comparison? In real life, what does that buy you? 100% YES! If two values are the same, then a

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL]

2005-10-19 Thread Tino Wildenhain
Am Mittwoch, den 19.10.2005, 22:04 +0200 schrieb Tino Wildenhain: > Am Mittwoch, den 19.10.2005, 16:29 -0300 schrieb Marc G. Fournier: > > I'm CC'ng this over to -hackers ... Tom? Comments? > > > ... > > >> Then we are broken too :) > > >> > > >> # select 'a ' = 'a '; > > >> ?column? > > >> -

Re: [HACKERS] 'a' == 'a '

2005-10-19 Thread Dann Corbit
PROTECTED]; pgsql-general@postgresql.org > Subject: Re: [HACKERS] 'a' == 'a ' > > Dann, > > > I think that whatever is done ought to be whatever the standard says. > > If I misinterpret the standard and PostgreSQL is doing it right, then > >

Re: [HACKERS] 'a' == 'a '

2005-10-19 Thread Josh Berkus
Dann, > I think that whatever is done ought to be whatever the standard says. > If I misinterpret the standard and PostgreSQL is doing it right, then > that is fine.  It is just that PostgreSQL is very counter-intuitive > compared to other database systems that I have used in this one > particular

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-19 Thread Dann Corbit
> -Original Message- > From: Martijn van Oosterhout [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 19, 2005 2:46 PM > To: Dann Corbit > Cc: Terry Fielder; Tino Wildenhain; Marc G. Fournier; > [EMAIL PROTECTED]; pgsql-hackers@postgresql.org; pgsql- > [EMAIL PROTECTED] > Subject: Re: 'a

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-19 Thread Dann Corbit
> -Original Message- > From: Stephan Szabo [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 19, 2005 2:34 PM > To: Dann Corbit > Cc: Terry Fielder; Tino Wildenhain; Marc G. Fournier; > [EMAIL PROTECTED]; pgsql-hackers@postgresql.org; pgsql- > [EMAIL PROTECTED] &g

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-19 Thread Martijn van Oosterhout
On Wed, Oct 19, 2005 at 02:05:20PM -0700, Dann Corbit wrote: > > When the compared datatypes are VARCHAR: YES > > What is the value of doing that? > > I can see plenty of harm and absolutely no return. We are talking about > blank padding before comparison. Do you really want 'Danniel ' > consi

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

2005-10-19 Thread Stephan Szabo
On Wed, 19 Oct 2005, Dann Corbit wrote: > > -Original Message- > > From: Terry Fielder [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, October 19, 2005 2:05 PM > > To: Dann Corbit > > Cc: Tino Wildenhain; Marc G. Fournier; [EMAIL PROTECTED]; > > pgsql-hackers@postgresql.org; pgsql-general@p

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-19 Thread Dann Corbit
> -Original Message- > From: Terry Fielder [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 19, 2005 2:05 PM > To: Dann Corbit > Cc: Tino Wildenhain; Marc G. Fournier; [EMAIL PROTECTED]; > pgsql-hackers@postgresql.org; pgsql-general@postgresql.org > Subject: Re: 'a' == 'a ' (Was: RE: [p

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

2005-10-19 Thread Greg Stark
"Guy Rouillier" <[EMAIL PROTECTED]> writes: > Tino Wildenhain wrote: > > > > experiment=# SELECT 'a '::char = 'a '::char; > > ?column? > > -- > > t > > > > This does't show anything useful, because the ::char casting simply > takes the first char of any string: > > select 'abc'::char

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-19 Thread Dann Corbit
Try this query in Oracle, SQL*Server, DB/2, Informix, etc.: connxdatasync=# select 1 where cast('a' as varchar(30)) = cast('a ' as varchar(30)); ?column? -- (0 rows) I see how you can interpret the SQL Standard to make the above response a correct one. But is it the response that you wo

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

2005-10-19 Thread Tino Wildenhain
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