Re: UNIONS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: UNIONS
Date
Msg-id 7356.965674933@sss.pgh.pa.us
Whole thread Raw
In response to Re: UNIONS  (Thomas Swan <tswan@olemiss.edu>)
List pgsql-hackers
Thomas Swan <tswan@olemiss.edu> writes:
> The reason I was asking is that I had an idea for doing the select ** from 
> tablename* that would expand.

> It could be macro of sorts but part of it depending on creating a null 
> table or the equivalent of it with nothing but a null column for each 
> different column of the set.

What happens when two different child tables have similarly-named
columns of different types?

In any case, this wouldn't be a very satisfactory solution because you
couldn't tell the difference between a null stored in a child table and
the lack of any column at all.  We really need to do it the hard way,
ie, issue a new tuple descriptor as we pass into each new child table.

There appears to have once been support for that back in the Berkeley
days; you might care to dig through Postgres 4.2 or so to see how they
did it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [GENERAL] Trouble with float4 afterupgrading from 6.5.3 to 7.0.2
Next
From: Tom Lane
Date:
Subject: Re: Constraint stuff