Re: insert/update/delete statements returning a query response - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: insert/update/delete statements returning a query response
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA41EB435@m0114.s-mxs.net
Whole thread Raw
In response to insert/update/delete statements returning a query response  (Barry Lind <barry@xythos.com>)
List pgsql-hackers
> Is this behavior intended in the backend?  The problem is that when
you 
> create a rule on an object that calls a stored function and invoke
that 
> rule on an insert/update/delete statement your insert/update/delete 
> statement will now return a query result to the front end over the
FE/BE 
> protocol.

Since this behavior is essential to the rule system, imho the actual
source
of problems is, that PostgreSQL does not have "real stored procedures"
==
functions that do not have a return value or set (C lingo: void
func_a(x)).

The usual view rule that needs enhanced processing intelligence would
then call a stored procedure and not a function.

The easy way out would be to write rules with instead actions, that
call insert/update/delete statemants directly. This often works
for the more common cases.

Andreas


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Pre-page images in WAL
Next
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: Pre-page images in WAL