UNIONS
От | Thomas Swan |
---|---|
Тема | UNIONS |
Дата | |
Msg-id | 5.0.0.11.2.20000807103335.00ad2a90@sunset.backbone.olemiss.edu обсуждение исходный текст |
Ответы |
Re: UNIONS
|
Список | pgsql-hackers |
<font face="Arial, Helvetica">Is this a bug or have I just not noticed a nuance with SQL<br /><br /> Assume I have createthe two tables <br /><br /></font><font face="Courier, Courier"><b>create table foo (<br /> id int4,<br />);<br /><br /> create table foo_child (<br /> name text<br /> ) inherits (foo);<br /><br /></b></font><font face="Arial,Helvetica">If I do <br /><br /></font><font face="Courier, Courier"><b>select id, name from foo_child union selectid, null as name from foo;<br /></b></font><font face="Arial, Helvetica">it works<br /><br /></font><font face="Courier,Courier"><b>select id, null as text from foo union select id, name from foo_child;<br /></b></font><font face="Arial,Helvetica">fails with <br /><br /></font><font face="Courier, Courier"><b>unable to trasform {insert whatevertype here} into unknown<br /> Each UNION | EXCEPT | INTERSECT clause must have compatible target types<br/><br /></b></font><font face="Arial, Helvetica">If this isn't a bug, it would be nice to be a nice feature to beable to coax a data type into an 'unknown' field... <br /><br /> I know it would make my life easier... :)<br /><br /><br/> - <b><u>Thomas Swan</u></b> <br /> - Graduate Student - Computer Science<br />- The University of Mississippi<br /> - <br /> - "People can be categorized into two fundamental <br /> - groups, thosethat divide people into two groups <br /> - and those that don't."- <br /></font>
В списке pgsql-hackers по дате отправления: