aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-01-21 11:02:40 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-01-21 11:02:40 +0000
commit94136d5a18403445cd60ae6beb470f6ebecca8b3 (patch)
tree96999d4189dbaf14033fa70cad6cf9d0ae904904 /doc/src
parent0154345078fb96a8bbe8b8785628400b17e5a75b (diff)
downloadpostgresql-94136d5a18403445cd60ae6beb470f6ebecca8b3.tar.gz
postgresql-94136d5a18403445cd60ae6beb470f6ebecca8b3.zip
Add new SPI_OK_REWRITTEN return code to SPI_execute and friends, for the
case that the command is rewritten into another type of command. The old behavior to return the command tag of the last executed command was pretty surprising. In PL/pgSQL, for example, it meant that if a command was rewritten to a utility statement, FOUND wasn't set at all.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/spi.sgml12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml
index 9df76db0457..32cc6149f98 100644
--- a/doc/src/sgml/spi.sgml
+++ b/doc/src/sgml/spi.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.63 2009/01/07 13:44:36 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.64 2009/01/21 11:02:40 heikki Exp $ -->
<chapter id="spi">
<title>Server Programming Interface</title>
@@ -527,6 +527,16 @@ typedef struct
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><symbol>SPI_OK_REWRITTEN</symbol></term>
+ <listitem>
+ <para>
+ if the command was rewritten into another kind of command (e.g.,
+ <command>UPDATE</command> became an <command>INSERT</command>) by a <link linkend="rules">rule</link>.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>