"Robert J. Sanford, Jr." <rsanford@trefs.com> writes:
> one bit that I'm currently having the largest issue with is the
> @@IDENTITY property. For those not familiar with SQL Server,
> performing "SELECT @@IDENTITY" allows a user to retrieve the primary
> key of the last row inserted into a table (assuming the table is
> using an identity column as the primary key)
Use a serial column as the primary key, and then @@IDENTITY can be
implemented as currval() on the associated sequence. This is more
flexible than what you describe for SQL Server, because the currval
can be retrieved at any later time in the same session --- as long
as you don't do another insert into the same table, it's still good.
regards, tom lane