Re: [HACKERS] SELECT BUG

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: José Soares <jose(at)sferacarta(dot)com>
Cc: hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] SELECT BUG
Date: 1999-09-01 13:30:38
Message-ID: 17572.936192638@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?iso-8859-1?Q?Jos=E9?= Soares <jose(at)sferacarta(dot)com> writes:
> --I have the following test data into these tables:

> hygea=> select * from master1;
> code
> -----------
> a
> a1
> a13
> (3 rows)

> hygea=> select * from detail1;
> code
> ----------------
> a13
> a13
> a1
> (3 rows)

> --if I try to join these two tables I have the following (nothing):

> hygea=> select m.*, d.* from master1 m, detail1 d where m.code=d.code;
> code|code
> ----+----
> (0 rows)
> --and now trying with TRIM function... it works!

> hygea=> select m.*, d.* from master1 m, detail1 d where
> trim(m.code)=trim(d.code
> code |code
> -----------+----------------
> a13 |a13
> a13 |a13
> a1 |a1
> (3 rows)

Looks to me like you have differing numbers of trailing spaces in the
entries in each table. If so, this is not a bug.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-01 13:41:14 Re: [HACKERS] File descriptor leakage?
Previous Message Tom Lane 1999-09-01 13:26:28 Re: [HACKERS] OID 718 and Circle