Jon,
Jon Swinth wrote:
> The code actually calls a select
> from currval() first and then on exception calls nextval() to see what the sequence is currently at.
The description here sounds like you are doing something you cannot do
in Postgres. If you get an exception/error in postgres you cannot just
catch the exception and continue processing. Any error in postgres will
abort the transaction, you must first do an explicit rollback() before
you can continue issuing additional sql statements. So when you say
'and then on excpetion calls ...' it sounds to me like you are trapping
an exception and trying to do additional work.
thanks,
--Barry