UNIONS
Thomas Swan <tswan@olemiss.edu>
From: Thomas Swan <tswan@olemiss.edu>
To: pgsql-hackers@postgresql.org
Date: 2000-08-07T16:01:36Z
Lists: pgsql-hackers
Is this a bug or have I just not noticed a nuance with SQL
Assume I have create the two tables
create table foo (
id int4,
);
create table foo_child (
name text
) inherits (foo);
If I do
select id, name from foo_child union select id, null as name from foo;
it works
select id, null as text from foo union select id, name from foo_child;
fails with
unable to trasform {insert whatever type here} into unknown
Each UNION | EXCEPT | INTERSECT clause must have compatible target
types
If this isn't a bug, it would be nice to be a nice feature to be able to
coax a data type into an 'unknown' field...
I know it would make my life easier... :)
- Thomas Swan
- Graduate Student - Computer Science
- The University of Mississippi
-
- "People can be categorized into two fundamental
- groups, those that divide people into two groups
- and those that don't."-