PostgreSQL sequence within function - Mailing list pgsql-general

From Clark Allan
Subject PostgreSQL sequence within function
Date
Msg-id 4a7a732105063012037cf8dc1e@mail.gmail.com
Whole thread Raw
Responses Re: PostgreSQL sequence within function  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
List pgsql-general
I am new to Postgre, and am still learning some of the basics...
please bare with me.

I need to know how to access a sequence from within a function. Let me
know whats wrong with the following...

(this is not the exact function, just for examples sake...)
----------------------------------------------
CREATE FUNCTION getSeq()
RETURNS int AS'
RETURN nextval('myseq')
'LANGUAGE 'plpgsql';
----------------------------------------------

Thanks for the help
Clark

pgsql-general by date:

Previous
From: "Adam O'Toole"
Date:
Subject: get the SALT
Next
From: Albert Vernon Smith
Date:
Subject: optimizer not optimizing