From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Petr Korobeinikov <pkorobeinikov(at)gmail(dot)com>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, Jeevan Chalke <jeevan(dot)chalke(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql :: support for \ev viewname and \sv viewname |
Date: | 2015-07-22 21:00:54 |
Message-ID: | CAEZATCV5dFWXcoV2AkxYWRmsPTvpwXGmSERO6x1eopE34txvRw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 22 July 2015 at 21:37, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
>> On 3 July 2015 at 20:50, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Oh? If that were true, pg_dump wouldn't work on such views. It is kind
>>> of a PITA for this purpose that it doesn't include the CREATE text for
>>> you, but we're surely not changing that behavior now.
>
>> This appears to be missing support for view options (WITH CHECK OPTION
>> and security_barrier), so editing a view with either of those options
>> will cause them to be stripped off.
>
> Hm. Why exactly were those not implemented as part of pg_get_viewdef?
>
pg_get_viewdef in its current form is needed for the
information_schema "views" view, which has separate columns for the
view's query and its CHECK OPTIONs.
Arguably another function could be added. However, given the need for
psql to support older server versions, a new function wouldn't
actually help much, since psql would still need to be able to do it
the hard way in the absence of that new function on the server.
Regards,
Dean
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2015-07-22 21:17:36 | Re: A little RLS oversight? |
Previous Message | Gurjeet Singh | 2015-07-22 20:59:29 | Re: ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX has dump-restore hazard |