> > See currval() and nextval(). > > What if his PK isn't a sequence?
Moreover, currval() and nextval() won't guarantee that you always get the most recently inserted sequence value, either, because each connection can have a cache of sequence values to assign from. While the backend guarantees that each sequence value will be UNIQUE there is no guarantee that MY currval() or nextval() is actually based on the last sequence value that ANYONE used. In short, I think the answer to the original question is that there is no reliable way to find out what the last record inserted was. -- Mike Nolan ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly