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 ???

Thank you
Pierre


Mon, 31 May 2004 15:38:15 +0200
Pierre Emmanuel Gros <Pierre-Emmanuel.Gros@limsi.fr>
constraint upon view
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

Wed, 2 Jun 2004 13:28:46 -0700
Jonathan Gardner <jgardner@jonathangardner.net>
Re: constraint upon view
In fact i want this kind of view , because my views are forms with a
jdbc selection like

create view toto (integer,integer) as SELECT a,b FROM executeJDBC(jdbc
connection,jdbc uri, 'select a,b from toto');

Where the view toto is filled by the function executeJDBC (jdbc driver,
jdbc uri, remote query )

The problem is i lose to much information about my remote table (primary
key, indexes...) to make good JOIN operation.(for big table , this join
operation
without information upon primary key are very slow...)

So i like to extends the create view syntax to add constraint
information , and i hope speed up my join operation.

I would like to know what to change in the source to obtain this extension .
Pierre
PS excuse me if i was not clear.



Jonathan Gardner wrote:

>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.
>
>  
>



Tue, 15 Jun 2004 18:24:22 +0200
Pierre Emmanuel Gros <Pierre-Emmanuel.Gros@limsi.fr>
Re: constraint upon view