Skip site navigation (1) Skip section navigation (2)

Re: constraint upon view

From: Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
To: Pierre Emmanuel Gros <Pierre-Emmanuel(dot)Gros(at)limsi(dot)fr>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: constraint upon view
Date: 2004-06-02 20:28:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-06-02 20:40:05
Subject: Re: [HACKERS] Configuration patch
Previous:From: Marty ScholesDate: 2004-06-02 19:38:47
Subject: Indices pinned in pageable RAM?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group