pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: Randall Lucas <rlucas@tercent.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: merge-join for domain with underlying type text
Date: 10 May 2003 20:48:37 -0400
Message-ID: <1052614116.48831.79.camel@jester> (raw)
In-Reply-To: <D3D5C340-8340-11D7-B164-000A957653D6@tercent.net>
References: <D3D5C340-8340-11D7-B164-000A957653D6@tercent.net>

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@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

  signature.asc (application/pgp-signature, 186B) download

view thread (6+ messages)  latest in thread

Message-ID: <1052614116.48831.79.camel@jester>
Permalink:  ../1052614116.48831.79.camel@jester/
Also on:    postgresql.org/message-id/1052614116.48831.79.camel@jester

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rbt@rbt.ca, rlucas@tercent.net
  Subject: Re: merge-join for domain with underlying type text
  In-Reply-To: <1052614116.48831.79.camel@jester>

* 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