AW: UNIONS

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: AW: UNIONS
Date: 2000-08-08 07:39:55
Message-ID: 11C1E6749A55D411A9670001FA687963368045@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 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
>
> The UNION type-resolution code could use some work; right now I think
> the algorithm is to use the types of the first SELECT and force
> everything else into that.

Imho this is expected behavior (maybe even standard). Very easy to
understand.

> A more symmetrical
> promote-to-common-supertype approach would be nice.

While this sounds sexy it is not what people would expect (imho),
and would have a magic touch to it.

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-08-08 07:40:28 RE: Re: LIKE gripes
Previous Message Romanenko Mikhail 2000-08-08 03:59:49 Re: Trouble with float4 after upgrading from 6.5.3 to 7.0.2