Re: See the WHERE clause of a partial index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: See the WHERE clause of a partial index
Дата
Msg-id 20595.1347653162@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: See the WHERE clause of a partial index  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Ответы Re: See the WHERE clause of a partial index  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Список pgsql-general
Paul Jungwirth <pj@illuminatedcomputing.com> writes:
> It'd be great to get just the WHERE clause if possible, although I can
> work around it if not. I couldn't find much documentation re
> pg_get_expr. Does this message mean I can't use it, or am I just doing
> something wrong?:

>>>>>> select pg_get_expr('{NULLTEST :arg {VAR :varno 1 :varattno 6
> :vartype 1114 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1
> :varoattno 6 :location 128} :nulltesttype 0 :argisrow false}',
> 223630);
>     ERROR:  cannot accept a value of type pg_node_tree
>     LINE 1: select pg_get_expr('{NULLTEST :arg {VAR :varno 1 :varattno 6...


That's a security restriction (if you could pass random text to
pg_get_expr, you could probably crash it).  If you feed the actual
pg_index.indpred column to it, that won't happen.  I think the OID
argument will need to be the table not the index, but not 100% sure.

            regards, tom lane


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

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: See the WHERE clause of a partial index
Следующее
От: Paul Jungwirth
Дата:
Сообщение: Re: See the WHERE clause of a partial index