Try this version of your function.
I don't think you can assign a value to a variable in the declaration
section with the return value of a function.
CREATE OR REPLACE FUNCTION sp_slide_create(int4, bool, bool, bool,
varchar, text, varchar, varchar, int4)
RETURNS int4 AS'
DECLARE
aScriptID ALIAS FOR $1;
aAllowDGP ALIAS FOR $2;
aAllowDGO ALIAS FOR $3;
aWaitForSlideFinish ALIAS FOR $4;
aTitle ALIAS FOR $5;
aText ALIAS FOR $6;
aFlashFileDGP ALIAS FOR $7;
aFlashFileDGO ALIAS FOR $8;
aSlideType ALIAS FOR $9;
seqID int4;
BEGIN
seqID = nextval("seqslideid");
INSERT INTO tblslides
(slideid, scriptID, allowdgp, allowdgo, waitforslidefinish, title,
text, flashfiledgp, flashfiledgo, slidetype)
VALUES
(seqID, aScriptID, aAllowDGP, aAllowDGO, aWaitForSlideFinish, aTitle,
aText, aFlashFileDGP, aFlashFileDGO, aSlideType);
RETURN seqID;
END;'
LANGUAGE 'plpgsql' VOLATILE;
Clark Allan wrote:
Thanks for the help Tony,
But im still having some trouble.
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend