Hello, If you want to get the value of a autogenerated column it's better to use "RETURNING" insert into something returning primary key...
Best Regards, Rafael Domiciano Postgres DBA 2008/9/15 Scott Marlowe <[EMAIL PROTECTED]> > On Mon, Sep 15, 2008 at 11:53 AM, c k <[EMAIL PROTECTED]> > wrote: > > > > > > If I have a function having: > > begin > > insert into something ... > > select max(primary key) from something.. > > end; > > > > does the second statement within a function can view the results after > > execution of first statement to get max(P.K.)? > > Yep. > > -- > Sent via pgsql-admin mailing list ([EMAIL PROTECTED]) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin >