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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Patch to enable/disable rule on a table


  • From: Dave Page <dpage(at)postgresql(dot)org>
  • To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
  • Cc: pgadmin-hackers(at)postgresql(dot)org
  • Subject: Re: Patch to enable/disable rule on a table
  • Date: Fri, 23 Nov 2007 17:09:57 +0000
  • Message-id: <47470965(dot)8080307(at)postgresql(dot)org>

Guillaume Lelarge wrote:
> Hi all,
> 
> Here is a patch to support this new PostgreSQL 8.3 feature : the
> possibility to enable and disable a rule on a table.

Thanks, applied with minor changes:

- Correct the naming of pgRule::iSetEnabled to pgRule::SetEnabled, and
added iSetEnabled with the correct functionality. In a nutshell, the
functions prefixed with 'i' are used to setup the internal state of the
object (usually called by CreateObjects in the appropriate factory), but
not change it, whilst those without the 'i' actually change the object
and it's internal state. This was also broken in the Trigger
enable/disable code which I guess you probably copied - fixed there too.

- Added code to prevent the option being offered for rules under views
as the syntax isn't there to allow rules on views (or rules that make
views) to be enabled or disabled.

- Re-jigged the menus a touch as they were starting to look a little
messy with various new options being added.

Cheers, Dave.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group