Re: marking record origin in views

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: marking record origin in views
Date: 2003-11-26 16:03:55
Message-ID: 87d6bfxgk4.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Peter Alberer" <h9351252(at)obelix(dot)wu-wien(dot)ac(dot)at> writes:

> Hmm, what about
>
> create view v1 as
> select *,1 as source from t1
> union
> select *,2 as source from t2;

And you might want "UNION ALL". Otherwise the database has to go eliminate
duplicate records (and there won't be any duplicate records with the "source"
column there anyways).

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Barbara Lindsey 2003-11-26 16:20:54 postgres metadata
Previous Message Riyad Kalla 2003-11-26 15:52:08 Re: Java Strings and quote marks