union query - Mailing list pgsql-general

From Tamsin
Subject union query
Date
Msg-id NEBBKHBOBMJCHDMGKCNJIEEFCIAA.tg_mail@bryncadfan.co.uk
Whole thread Raw
Responses Re: union query
List pgsql-general
Just spent an hour getting nowhere, til I discovered this (description is a
varchar field):

    select description from address union select 'other';

fine but...

   select 'other' union select description from address;
   ERROR:  Unable to transform varchar to unknown
        Each UNION | EXCEPT | INTERSECT clause must have compatible target
types

Its not a problem, as I now I've worked it out I can do what I wanted (a
long nasty union to get around some outer join issues), but I just wondered
if the order of the selects in a union should matter?

tamsin


pgsql-general by date:

Previous
From: "Adam Lang"
Date:
Subject: Re: xml middleware
Next
From: Tom Lane
Date:
Subject: Re: MacOS X