Re: how to find out whether a view is updatable

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to find out whether a view is updatable
Date: 2013-06-11 07:07:23
Message-ID: CAEZATCXhyNrXbA8EuDoKq05XRwPVpaDT1AWrPGFHY4+yvE2nvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11 June 2013 01:03, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
> Sorry for my late reply.
>
> On Sun, Jun 9, 2013 at 6:45 PM, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
> 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-level control over updatability, or something like
>> "use_remote_updatability" could be added, but that all feels like 9.4
>> material.
>
>
> Yes this is definitely material for 9.4. You should add this patch to the
> 1st commit fest. I'll add myself as a reviewer.
> Thanks,
>

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.

pg_view_is_updatable() and pg_view_is_insertable() are both new to
9.3. They were designed purely to support the information schema
views, but are inadequate for most other practical purposes. Once 9.3
is out, we'll be stuck with them - although of course that doesn't
stop us adding more functions, I think it would be better to replace
them now.

Likewise the writable FDW API is new to 9.3, so I think 9.3 should at
least decide on the API for a FDW to specify whether a foreign table
is updatable.

Regards,
Dean

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2013-06-11 07:24:45 Re: Parallell Optimizer
Previous Message Markus Wanner 2013-06-11 06:53:47 Re: Proposal for CSN based snapshots