Skip site navigation (1) Skip section navigation (2)

Re: pg_rules definition format

From: Kevin Field <kevinjamesfield(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_rules definition format
Date: 2009-05-14 18:52:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On May 14, 2:22 pm, Kevin Field <kevinjamesfi(dot)(dot)(dot)(at)gmail(dot)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.

In response to

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2009-05-14 19:05:21
Subject: Re: New trigger option of pg_standby
Previous:From: Fujii MasaoDate: 2009-05-14 18:49:29
Subject: Re: New trigger option of pg_standby

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group