PostgreSQL 8.1 and above defined the fuction lastval() that returns the
value of the last sequence that nextval() was used on in the current session.
Call lastval() if nextval() has not yet been called in the current
session throw an exception.
Namespace: NHibernate.DialectAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)