Re: PostgreSQL sequence within function - Mailing list pgsql-general

From Tony Caduto
Subject Re: PostgreSQL sequence within function
Date
Msg-id 42C452D5.4000106@amsoftwaredesign.com
Whole thread Raw
In response to PostgreSQL sequence within function  (Clark Allan <clarka@gmail.com>)
Responses Re: PostgreSQL sequence within function
List pgsql-general
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
>
>



pgsql-general by date:

Previous
From: Albert Vernon Smith
Date:
Subject: optimizer not optimizing
Next
From: "Joshua D. Drake"
Date:
Subject: Re: optimizer not optimizing