AW: [HACKERS] Insert into view - Mailing list pgsql-hackers

From Zeugswetter Andreas SEV
Subject AW: [HACKERS] Insert into view
Date
Msg-id 219F68D65015D011A8E000006F8590C603FDC19D@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> I think Jan muttered something about emitting a warning notice for an
> attempt to store into a table that has an ON SELECT DO 
> INSTEAD rule but
> no ON INSERT rule --- which would imply that you'll never be able to
> see the data you're inserting.
> 
> This mistake has bitten enough people (including me ;-)) that it seems
> a warning might be a good idea.  I'm not sure if I want it to 
> be a hard
> error though.  Are there any cases where it'd make sense to 
> allow this?

Of course the real nice answer would be to create a new pg_class type 'V'
in addition to the existing table types.
Advantage:
1. no table files needed
2. we know it is a view for sure

I for one have tables with "on select do instead" rules that are not views.

Andreas


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions