Re: [HACKERS] how to find out whether a view is updatable

2013-07-11 Thread Dean Rasheed
On 19 June 2013 18:12, Peter Eisentraut wrote: > On 6/19/13 11:50 AM, Dean Rasheed wrote: >> On 19 June 2013 15:22, Peter Eisentraut wrote: >>> We still don't have any support for this in psql, do we? >>> >> >> No, but at least we now have an API that psql can use. >> >> There are still a number

Re: [HACKERS] how to find out whether a view is updatable

2013-06-19 Thread Dean Rasheed
On 19 June 2013 18:12, Peter Eisentraut wrote: > On 6/19/13 11:50 AM, Dean Rasheed wrote: >> On 19 June 2013 15:22, Peter Eisentraut wrote: >>> We still don't have any support for this in psql, do we? >>> >> >> No, but at least we now have an API that psql can use. >> >> There are still a number

Re: [HACKERS] how to find out whether a view is updatable

2013-06-19 Thread Peter Eisentraut
On 6/19/13 11:50 AM, Dean Rasheed wrote: > On 19 June 2013 15:22, Peter Eisentraut wrote: >> We still don't have any support for this in psql, do we? >> > > No, but at least we now have an API that psql can use. > > There are still a number of questions about the best way to display it in > psq

Re: [HACKERS] how to find out whether a view is updatable

2013-06-19 Thread Dean Rasheed
On 19 June 2013 15:22, Peter Eisentraut wrote: > We still don't have any support for this in psql, do we? > No, but at least we now have an API that psql can use. There are still a number of questions about the best way to display it in psql. Should it be another column in \d+'s list of relation

Re: [HACKERS] how to find out whether a view is updatable

2013-06-19 Thread Peter Eisentraut
On 6/13/13 1:37 AM, Dean Rasheed wrote: > On 12 June 2013 23:01, Tom Lane wrote: >> > Dean Rasheed writes: >>> >> [ pg_relation_is_updatable.patch ] >> > >> > I've committed this with some modifications as mentioned. There is >> > still room to debate exactly what >> > information_schema.columns

Re: [HACKERS] how to find out whether a view is updatable

2013-06-12 Thread Dean Rasheed
On 12 June 2013 23:01, Tom Lane wrote: > Dean Rasheed writes: >> [ pg_relation_is_updatable.patch ] > > I've committed this with some modifications as mentioned. There is > still room to debate exactly what > information_schema.columns.is_updatable means --- we can now change that > without an i

Re: [HACKERS] how to find out whether a view is updatable

2013-06-12 Thread Tom Lane
Dean Rasheed writes: > [ pg_relation_is_updatable.patch ] I've committed this with some modifications as mentioned. There is still room to debate exactly what information_schema.columns.is_updatable means --- we can now change that without an initdb. regards, tom lane

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Dean Rasheed
On 11 June 2013 22:53, Tom Lane wrote: > Dean Rasheed writes: >> Here's a more complete patch along those lines. It defines the >> following pair of functions to test for updatability from SQL: > >> FUNCTION pg_catalog.pg_relation_is_updatable(reloid oid, >>

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Tom Lane
Dean Rasheed writes: > Here's a more complete patch along those lines. It defines the > following pair of functions to test for updatability from SQL: > FUNCTION pg_catalog.pg_relation_is_updatable(reloid oid, >include_triggers boolean) > RETURN

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Michael Paquier
On Tue, Jun 11, 2013 at 4:07 PM, Dean Rasheed wrote: > Thanks. Arguably though, the API changes are something that should be > sorted out in 9.3, but I'm not sure how much of an appetite there is > for that, or whether it's too late. > I see, OK for the API changes on the functions, but I am not s

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Tom Lane
Dean Rasheed writes: > On 11 June 2013 01:03, Michael Paquier wrote: >> Yes this is definitely material for 9.4. You should add this patch to the > Thanks. Arguably though, the API changes are something that should be > sorted out in 9.3, I agree --- I'm planning to look at this in the next few

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Dean Rasheed
On 11 June 2013 01:03, Michael Paquier wrote: > Sorry for my late reply. > > On Sun, Jun 9, 2013 at 6:45 PM, Dean Rasheed > wrote: >> >> I called it updatable rather than "writable" or "read-only" because it >> might perhaps be extended in the future with separate options for >> "insertable" and

Re: [HACKERS] how to find out whether a view is updatable

2013-06-10 Thread Michael Paquier
Sorry for my late reply. On Sun, Jun 9, 2013 at 6:45 PM, Dean Rasheed wrote: > I called it updatable rather than "writable" or "read-only" because it > might perhaps be extended in the future with separate options for > "insertable" and "deletable". It could also be extended to give > column-leve

Re: [HACKERS] how to find out whether a view is updatable

2013-06-09 Thread Dean Rasheed
On 6 June 2013 08:09, Dean Rasheed wrote: > On 5 June 2013 08:59, Dean Rasheed wrote: >> I'm still not happy with pg_view_is_updatable() et al. and the >> information_schema views. I accept that the information_schema views >> have to be the way they are because that's what's defined in the >> st

Re: [HACKERS] how to find out whether a view is updatable

2013-06-06 Thread Dean Rasheed
On 5 June 2013 08:59, Dean Rasheed wrote: > I'm still not happy with pg_view_is_updatable() et al. and the > information_schema views. I accept that the information_schema views > have to be the way they are because that's what's defined in the > standard, but as it stands, the distinction between

Re: [HACKERS] how to find out whether a view is updatable

2013-06-05 Thread Dean Rasheed
On 4 June 2013 23:35, Michael Paquier wrote: > > > > On Wed, Jun 5, 2013 at 12:59 AM, Peter Eisentraut wrote: >> >> I was looking for a way in which the average psql user could learn >> whether a view is updatable. I was expecting something in \d, \d+, \dv, >> \dv+, or a NOTICE from CREATE VIEW.

Re: [HACKERS] how to find out whether a view is updatable

2013-06-04 Thread Michael Paquier
On Wed, Jun 5, 2013 at 12:59 AM, Peter Eisentraut wrote: > I was looking for a way in which the average psql user could learn > whether a view is updatable. I was expecting something in \d, \d+, \dv, > \dv+, or a NOTICE from CREATE VIEW. So far, the only way appears to be > through the informat