Unix Technical Forum

Docs for CREATE RULE with WHERE/NOTIFY

This is a discussion on Docs for CREATE RULE with WHERE/NOTIFY within the Pgsql Patches forums, part of the PostgreSQL category; --> Hello, I've just been bitten by this: dsuch=# CREATE RULE foorule AS ON UPDATE dsuch-# TO foo WHERE NEW.x ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:17 AM
Dariusz Suchojad
 
Posts: n/a
Default Docs for CREATE RULE with WHERE/NOTIFY

Hello,

I've just been bitten by this:

dsuch=# CREATE RULE foorule AS ON UPDATE
dsuch-# TO foo WHERE NEW.x = '1'
dsuch-# DO ALSO NOTIFY bar;
ERROR: rules with WHERE conditions may only have SELECT, INSERT,
UPDATE, or DELETE actions

Here's an explanation
http://archives.postgresql.org/pgsql...1/msg00986.php,
but would you also consider applying the following tiny patch to
create_rule.sgml
to document the behaviour?

thank you,

*** create_rule.sgml.orig Sun Jun 24 21:09:22 2007
--- create_rule.sgml Sun Jun 24 21:09:37 2007
***************
*** 176,185 ****
--- 176,187 ----
<para>
The command or commands that make up the rule action. Valid
commands are <command>SELECT</command>,
<command>INSERT</command>, <command>UPDATE</command>,
<command>DELETE</command>, or <command>NOTIFY</command>.
+ Note that <command>NOTIFY</command> is not a valid command if
+ <replaceable class="parameter">condition</replaceable> is
specified.
</para>
</listitem>
</varlistentry>
</variablelist>

--
Dariusz Suchojad

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:41 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com