Re: constraint upon view - Mailing list pgsql-hackers

From Jonathan Gardner
Subject Re: constraint upon view
Date
Msg-id 200406021328.46902.jgardner@jonathangardner.net
Whole thread Raw
In response to constraint upon view  (Pierre Emmanuel Gros <Pierre-Emmanuel.Gros@limsi.fr>)
Responses Re: constraint upon view
List pgsql-hackers
On Monday 31 May 2004 06:38 am, Pierre Emmanuel Gros wrote:
> Hi,
> I would like to know if i can add constraint and typed column upon a
> create view sentence.
> something like create view toto (a INTEGER primary key , b VARCHAR) as
> select .....
> If it is not possible , what to have to change in the backend sources to
> obtain the result ???
>

I don't think you want a view in this case. When you select against a view, 
the view is unrolled into the statement that forms it. Try a look at the 
results of "EXPLAIN ANALYZE" when you are selecting against a view.

-- 
Jonathan Gardner
jgardner@jonathangardner.net


pgsql-hackers by date:

Previous
From: Marty Scholes
Date:
Subject: Indices pinned in pageable RAM?
Next
From: ivan
Date:
Subject: process num.