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
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
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
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
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
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?
> > >> -
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
> >
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
> -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
> -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
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
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
> -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
"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
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
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
16 matches
Mail list logo