Re: [HACKERS] SELECT BUG

From: José Soares <jose(at)sferacarta(dot)com>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] SELECT BUG
Date: 1999-09-02 16:47:41
Message-ID: 37CEAA2D.9DA0FAD5@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry for the confusion:

Here an example...

create table master(mcode char(11), mcode1 char(16));
create table detail(dcode char(16));
insert into master values ('a','a');
insert into master values ('a1','a1');
insert into master values ('a13','a13');
insert into detail values ('a13');
insert into detail values ('a1');
insert into detail values ('a13');

--in the following example mcode is long 11 and mcode1 is long 16
--but mcode=mcode1 is true:

select * from master where mcode=mcode1;
mcode |mcode1
-----------+----------------
a |a
a1 |a1
a13 |a13
(3 rows)

--in the following example mcode is long 11 and dcode1 is long 16
--but mcode=dcode1 is false:

select mcode, dcode from master m, detail d where mcode=dcode;
mcode|dcode
-----+-----
(0 rows)

the same example in informix-SE gives me this:
----------------------------------------------
code code

a1 a1
a13 a13

José

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-02 17:33:42 Re: [HACKERS] SELECT BUG
Previous Message Ricardo Coelho 1999-09-02 16:35:03 Re: [HACKERS] Odd problem with pg_class ...