pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Wieck <JanWieck@Yahoo.com>
To: Dann Corbit <DCorbit@connx.com>
Cc: Terry Fielder <terry@ashtonwoodshomes.com>
Cc: Marc G. Fournier <scrappy@postgresql.org>
Cc: Richard_D_Levine@raytheon.com
Cc: pgsql-general@postgresql.org
Subject: Re: [pgsql-advocacy] Oracle buys Innobase
Date: Wed, 19 Oct 2005 18:44:49 -0400
Message-ID: <4356CC61.3050107@Yahoo.com> (raw)
In-Reply-To: <D425483C2C5C9F49B5B7A41F8944154757D204@postal.corporate.connx.com>
References: <D425483C2C5C9F49B5B7A41F8944154757D204@postal.corporate.connx.com>

On 10/19/2005 3:46 PM, Dann Corbit wrote:
> Would you want varchar(30) 'Dann Corbit' to compare equal to bpchar(30)
> 'Dann Corbit'?
> 
> I would.  

wieck=# select 'Jan'::varchar(20) = 'Jan'::char(20);
  ?column?
----------
  t
(1 row)

wieck=# select 'Jan'::char(20) = 'Jan'::varchar(20);
  ?column?
----------
  t
(1 row)

wieck=# select version();
                                version
---------------------------------------------------------------------
  PostgreSQL 8.0.4 on i386-unknown-freebsd4.9, compiled by GCC 2.95.4
(1 row)


Did I miss anything?


Jan

> 
> 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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



view thread (241+ messages)  latest in thread

Message-ID: <4356CC61.3050107@Yahoo.com>
Permalink:  ../4356CC61.3050107@Yahoo.com/
Also on:    postgresql.org/message-id/4356CC61.3050107@Yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: JanWieck@Yahoo.com, DCorbit@connx.com, terry@ashtonwoodshomes.com, scrappy@postgresql.org, Richard_D_Levine@raytheon.com
  Subject: Re: [pgsql-advocacy] Oracle buys Innobase
  In-Reply-To: <4356CC61.3050107@Yahoo.com>
  References: <D425483C2C5C9F49B5B7A41F8944154757D204@postal.corporate.connx.com> <4356CC61.3050107@Yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox