[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [GENERAL] PostgreSQL sequence within function
From: Tony Caduto <tony_caduto () amsoftwaredesign ! com>
Date: 2005-06-30 20:15:17
Message-ID: 42C452D5.4000106 () amsoftwaredesign ! com
[Download RAW message or body]
All you where really mising was a semi colon afer nextval('myseq') and
the begin end.
CREATE or REPLACE FUNCTION getSeq()
RETURNS int AS
$$
begin
RETURN nextval('myseq');
end;
$$
LANGUAGE 'plpgsql';
Clark Allan wrote:
>----------------------------------------------
>CREATE FUNCTION getSeq()
>RETURNS int AS'
>RETURN nextval('myseq')
>'LANGUAGE 'plpgsql';
>----------------------------------------------
>
>Thanks for the help
>Clark
>
>
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic