Re: pg_rules definition format

Поиск
Список
Период
Сортировка
От Kevin Field
Тема Re: pg_rules definition format
Дата
Msg-id 3933c1a7-646f-4c46-af25-6b55bccd5105@s28g2000vbp.googlegroups.com
обсуждение исходный текст
Ответ на pg_views definition format  (Kev <kevinjamesfield@gmail.com>)
Список pgsql-hackers
On May 14, 2:22 pm, Kevin Field <kevinjamesfi...@gmail.com> wrote:
>
> Something I ran into though when trying to extend this logic to rules:
> for some reason rule definitions are compiled with "create rule x as "
> in front of them, unlike views, which just have everything after the
> "as".  I can keep the two parts separate and test accordingly, but it
> seems a bit inconsistent.

The fix isn't actually this clean in the end, since the 'fake' rule to
be returned will have a different 'definition' (because its name is
different) than the one we'd actually use to insert.  So either we do
some regexing or we have to back up the old rule's definition, drop
the rule, insert it, get the new definiton, compare, and then if
they're different, drop it again and put the old one back.


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

Предыдущее
От: Kevin Field
Дата:
Сообщение: Re: pg_views definition format
Следующее
От: Kevin Field
Дата:
Сообщение: Re: pg_rules definition format