Re: Database Views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank Bax <fbax(at)sympatico(dot)ca>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Database Views
Date: 2008-11-06 17:50:22
Message-ID: 2124.1225993822@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Frank Bax <fbax(at)sympatico(dot)ca> writes:
> create or replace view vehicle as
> select 'car' as type,manufacturer,vin,color from car
> union
> select 'truck' as type,manufacturer,vin,color from truck
> union
> select 'suv' as type,manufacturer,vin,color from suv
> ;

UNION ALL would be better, since it would stop the system from uselessly
trying to eliminate duplicate rows ...

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Leví Teodoro da Silva 2008-11-07 12:07:45 Re: [DUMP] Make a dump with special characters
Previous Message Frank Bax 2008-11-06 17:45:38 Re: Database Views