<!--
-$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.43 2005/09/12 18:40:19 neilc Exp $
+$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.44 2005/12/07 15:39:25 tgl Exp $
-->
<chapter id="spi">
(1 row)
=> INSERT INTO a VALUES (execq('INSERT INTO a VALUES (0)', 0));
-INSERT 167631 1
+INSERT 0 1
=> SELECT execq('SELECT * FROM a', 0);
INFO: EXECQ: 0 -- inserted by execq
INFO: EXECQ: 1 -- returned by execq and inserted by upper INSERT
=> DELETE FROM a;
DELETE 3
=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
-INSERT 167712 1
+INSERT 0 1
=> SELECT * FROM a;
x
---
(1 row)
=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
-INFO: EXECQ: 0
-INSERT 167713 1
+INFO: EXECQ: 1
+INSERT 0 1
=> SELECT * FROM a;
x
---