What value should I RETURN for a SQL FUNCTION that contains an INSERT
statement?
--
Eddy Grabczewski
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
I've just looked at the new online 7.2 documentation and found that all
functions must end in some kind of select.
How about this then?
CREATE FUNCTION foo(varchar)
RETURN unknown
AS '
INSERT INTO footable VALUES ($1);
SELECT null; '
LANGUAGE 'sql';
&qu
I've sorted this one thanks to John Berkus.
Thanks guys. I've included the solution below
for your interest.
===
DROP TABLE rtest;
DROP INDEX rtest_xz_index;
DROP INDEX rtest_yz_index;
DROP INDEX rtest_xy_index;
CREATE TABLE rtest (
Could someone please tell me the correct syntax for the following problem in
plpgsql:
The following expression code sample works but now (for example) I'd like to
subsitute
the variables $1 and $2 for the numbers 0 and 2 in the following
expression:
INSERT INTO rtest(xz,yz,xy)
VALUES ( \'(0,2),