From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | Randall Lucas <rlucas(at)tercent(dot)net> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: merge-join for domain with underlying type text |
Date: | 2003-05-11 00:48:37 |
Message-ID: | 1052614116.48831.79.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Sat, 2003-05-10 at 19:40, Randall Lucas wrote:
> -- Hmm, here's some code that manifests the problem:
Seems it's been fixed in 7.4. In the mean time, you might try this:
select * from textual_test_1 full outer join textual_test_2 on
CAST(textual_test_1.key AS text) = CAST(textual_test_2.other_key AS
text);
-- LOG --
h=# create domain textual_test as text;
CREATE DOMAIN
h=# create table textual_test_1 (
h(# key textual_test,
h(# stuff varchar
h(# );
CREATE TABLE
h=# insert into textual_test_1 values ('alpha', 'asdflkjasdf');
INSERT 154456 1
h=# insert into textual_test_1 values ('bravo', 'asdfdasfsaff');
INSERT 154457 1
h=# insert into textual_test_1 values ('delta', 'asdfasfdas');
INSERT 154458 1
h=# create table textual_test_2 (
h(# other_key textual_test,
h(# more_stuff varchar
h(# );
CREATE TABLE
h=# insert into textual_test_2 values ('charlie', 'asdfasfasfda');
INSERT 154464 1
h=# insert into textual_test_2 values ('delta', 'asgasgdda');
INSERT 154465 1
h=# insert into textual_test_2 values ('echo', 'asdasfsdfsfda');
INSERT 154466 1
h=# select * from textual_test_1 full outer join textual_test_2 on
textual_test_1.key = textual_test_2.other_key;
key | stuff | other_key | more_stuff
-------+--------------+-----------+---------------
alpha | asdflkjasdf | |
bravo | asdfdasfsaff | |
| | charlie | asdfasfasfda
delta | asdfasfdas | delta | asgasgdda
| | echo | asdasfsdfsfda
(5 rows)
h=# select version();
version
------------------------------------------------------------------------
PostgreSQL 7.4devel on i386-unknown-freebsd4.8, compiled by GCC 2.95.4
(1 row)
--
Rod Taylor <rbt(at)rbt(dot)ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
From | Date | Subject | |
---|---|---|---|
Next Message | Randall Lucas | 2003-05-11 00:53:21 | Re: merge-join for domain with underlying type text |
Previous Message | Randall Lucas | 2003-05-10 23:40:48 | Re: merge-join for domain with underlying type text |