Search Postgresql Archives

Re: [pgsql-advocacy] Oracle buys Innobase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Oct 2005, Dann Corbit wrote:

-----Original Message-----
From: Stephan Szabo [mailto:sszabo@xxxxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, October 19, 2005 12:39 PM
To: Dann Corbit
Cc: Marc G. Fournier; Richard_D_Levine@xxxxxxxxxxxx; pgsql-
general@xxxxxxxxxxxxxx
Subject: Re: [pgsql-advocacy]  Oracle buys Innobase

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

Doesn't that depend on the collating sequence in use, or is a NO PAD
collating sequence not allowed here?

If the implementation defines constants as NO PAD and the implementation
defined pad character is something other than space, then they could
compare unequal.

I would find that implementation disturbing.  But I am easily bent out
of shape.

The attached HTML file in my earlier post is the official quote from the
SQL 99 standard.  That is the formal and correct definition, far
superior to my off the cuff approximations.

'k, if I'm reading the right section (you say its bolded, but I'm using pine which doesn't seem to do a good job of reading HTML):

===========
d) Depending on the collating sequence, two strings may compare as
equal even if they are of different lengths or contain different
sequences of characters. When any of the operations MAX, MIN, and
DISTINCT reference a grouping column, and the UNION, EXCEPT, and
INTERSECT operators refer to character strings, the specific value
selected by these operations from a set of such equal values is
implementation-dependent.
===========

I think the key part of that 'clause' is "two strings *may* compare as equal" ... sounds implementation dependent to me, depending on how the implementor interprets it ... or am I reading the wrong section?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@xxxxxxx           Yahoo!: yscrappy              ICQ: 7615664

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux