dbTalk Databases Forums  

[BUGS] rules ON INSERT

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] rules ON INSERT in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ralph Heinkel
 
Posts: n/a

Default [BUGS] rules ON INSERT - 11-07-2004 , 07:08 PM






Hi,

thanks to everybody who has answered to my question. Indeed the documents
let the programmer hope that s/he gets what should be expected:

In postgresql-7.4.1/doc/html/rules-update.html it says:
For ON INSERT rules, the original query (if not suppressed by INSTEAD)
is done before any actions added by rules. This allows the actions to
see the inserted row(s).

The relevant part is "to see the inserted row(s)". This is really misleading
if in reality something else (like a macro as I've learned now) is executed.

My naive question is: Would it really be a lot of work in the postgres
code to actually return the results instead of executing the macro?
Then the postgres world would be simpler again and everybody could
just use rules without having so separate two cases:
1. Rules ON INSERT work without 'serials'
2. Rules ON INSERT don't work with 'serials', use triggers instead.

Thanks,

Ralph

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.