From: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | José Soares <jose(at)sferacarta(dot)com> |
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 13:59:00 |
Message-ID: | 37CE82A4.A630090C@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> You mean that "a1 " is not equal to "a1 " ?
> but PostgreSQL has a different behavior in the following example:
You will have to give more details on your schema and data entry for
us to see the problem; things look good to me too. Examples below...
- Thomas
postgres=> create table t1 (v3 varchar(3), v5 varchar(5), c3 char(3),
c5 char(5));
CREATE
postgres=> insert into t1 values ('a1 ', 'a1 ', 'a1', 'a1');
INSERT 150220 1
postgres=> select * from t1 where v3 = v5;
v3|v5|c3|c5
--+--+--+--
(0 rows)
postgres=> select * from t1 where c3 = c5;
v3 |v5 |c3 |c5
---+-----+---+-----
a1 |a1 |a1 |a1
(1 row)
postgres=> select * from t1 where trim(v3) = trim(v5);
v3 |v5 |c3 |c5
---+-----+---+-----
a1 |a1 |a1 |a1
(1 row)
postgres=> insert into t1 values ('a2', 'a2', 'a2', 'a2');
INSERT 150221 1
postgres=> select * from t1 where v3 = v5;
v3|v5|c3 |c5
--+--+---+-----
a2|a2|a2 |a2
(1 row)
--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-09-02 14:05:35 | Re: [HACKERS] md.c is feeling much better now, thank you |
Previous Message | The Hermit Hacker | 1999-09-02 13:49:47 | Odd problem with pg_class ... |