Re: [HACKERS] CREATE OR REPLACE VIEW bug

2016-12-17 Thread Tom Lane
Dean Rasheed writes: > Attached is a patch enforcing this order and adding some comments to > make it clear why the order matters here. > Barring objections I'll back-patch this to 9.4 where WCO was added. Looks reasonable in a quick once-over. I didn't test it.

Re: [HACKERS] CREATE OR REPLACE VIEW bug

2016-12-17 Thread Dean Rasheed
On 17 December 2016 at 15:42, Dean Rasheed wrote: > It seems that there is a bug in CREATE OR REPLACE VIEW... > > DefineView()/DefineVirtualRelation() will need a little re-jigging to > do things in the required order. ...and the required order for existing views is 1.

[HACKERS] CREATE OR REPLACE VIEW bug

2016-12-17 Thread Dean Rasheed
It seems that there is a bug in CREATE OR REPLACE VIEW's handling of WITH CHECK OPTION (noticed while thinking about the recent change to pg_dump's handling of circular dependencies in views -- d8c05af). If you use CREATE OR REPLACE VIEW on a view that isn't auto-updatable and turn it into one