X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 459E9DA571; Wed, 19 Oct 2005 17:30:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25798-05; Wed, 19 Oct 2005 20:30:38 +0000 (GMT) Received: from mail.greatgulfhomes.com (mail.greatgulfhomes.com [216.191.52.66]) by svr1.postgresql.org (Postfix) with ESMTP id 370D5DA4F8; Wed, 19 Oct 2005 17:30:35 -0300 (ADT) Received: from [10.243.102.72] ([216.191.52.74]) (authenticated bits=0) by mail.greatgulfhomes.com (8.12.8/8.12.8) with ESMTP id j9JKUPPT029135; Wed, 19 Oct 2005 16:30:25 -0400 Message-ID: <4356AEC7.4000505@ashtonwoodshomes.com> Date: Wed, 19 Oct 2005 16:38:31 -0400 From: Terry Fielder User-Agent: Mozilla Thunderbird 1.0.5 (Windows/20050711) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dann Corbit Cc: "Marc G. Fournier" , Richard_D_Levine@raytheon.com, pgsql-general@postgresql.org Subject: Re: [pgsql-advocacy] Oracle buys Innobase References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.027 required=5 tests=[AWL=0.027] X-Spam-Level: X-Archive-Number: 200510/1197 X-Sequence-Number: 85426 I agree with you, but... Actually that's not how the compare works usually. Generally one of the operands is converted to the same datatype as the other, and THEN the compare is performed. I expect MS SQL is converting a 'sdas' typeless string to be assumed CHAR and Postgresql is converting a 'sdas' typeless string to be assumed VARCHAR. Hence, the different behaviour. Terry Dann Corbit wrote: > Would you want varchar(30) 'Dann Corbit' to compare equal to bpchar(30) > 'Dann Corbit'? > > I would. > > If both are considered character types by the language, then they must > compare that way. > > Perhaps there are some nuances that I am not aware of. But that is how > things ought to behave, if I were king of the forest. > > >>-----Original Message----- >>From: pgsql-general-owner@postgresql.org [mailto:pgsql-general- >>owner@postgresql.org] On Behalf Of Terry Fielder >>Sent: Wednesday, October 19, 2005 12:37 PM >>To: Marc G. Fournier >>Cc: Richard_D_Levine@raytheon.com; pgsql-general@postgresql.org >>Subject: Re: [pgsql-advocacy] [GENERAL] Oracle buys Innobase >> >>OK, I am not an expert on the SQL standard, but I thought the > > definition > >>varied by data type e.g. varchar <> bpchar >> >>Terry >> >>Marc G. Fournier wrote: >> >>>On Wed, 19 Oct 2005, Richard_D_Levine@raytheon.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) >>> >>>---- >>>Marc G. Fournier Hub.Org Networking Services >> >>(http://www.hub.org) >> >>>Email: scrappy@hub.org Yahoo!: yscrappy ICQ: >> >>7615664 >> >>>---------------------------(end of > > broadcast)--------------------------- > >>>TIP 4: Have you searched our list archives? >>> >>> http://archives.postgresql.org >>> >> >>-- >>Terry Fielder >>terry@greatgulfhomes.com >>Associate Director Software Development and Deployment >>Great Gulf Homes / Ashton Woods Homes >>Fax: (416) 441-9085 >> >>---------------------------(end of > > broadcast)--------------------------- > >>TIP 6: explain analyze is your friend > > -- Terry Fielder terry@greatgulfhomes.com Associate Director Software Development and Deployment Great Gulf Homes / Ashton Woods Homes Fax: (416) 441-9085