Re: 9.4 beta - pg_get_viewdef() and WITH CHECK OPTION

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 9.4 beta - pg_get_viewdef() and WITH CHECK OPTION
Дата
Msg-id 29532.1400463330@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 9.4 beta - pg_get_viewdef() and WITH CHECK OPTION  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: 9.4 beta - pg_get_viewdef() and WITH CHECK OPTION
Список pgsql-general
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On 17 May 2014 13:25, Thomas Kellerer <spam_eater@gmx.net> wrote:
>> when playing with 9.4 beta I noticed that the result of pg_get_viewdef()
>> will not include the new WITH CHECK OPTION clause when the view was created
>> using it.

> Yes, that's correct. pg_get_viewdef() only returns the underlying
> SELECT command for a view. This does not include any of the view's
> WITH parameters (check option and/or security barrier flag), because
> they aren't allowed in a SELECT statement.

> The additional parameters are held in pg_class.reloptions, and can be
> displayed from psql using \d+

I have to concur with the OP that this seems like a pretty darn weird
design choice.  reloptions are for nonstandard PG-specific options, not
for SQL-spec-mandated syntax.  What was the rationale for doing it like
that?

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: How to solve the problem "error reading c:\Program Files\PostgreSQL\9.3\data\postgresql.conf during installation"
Следующее
От: Sandeep Gupta
Дата:
Сообщение: slow query question: more indexes considered harmful