How to obtain serial generate when doing an insert?

From: "Williams, Travis L, NPONS" <tlw(at)att(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How to obtain serial generate when doing an insert?
Date: 2003-05-27 20:44:43
Message-ID: AB815D267EC31A4693CC24D234F8291604AFF88A@ACCLUST02EVS1.ugd.att.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with a serial field, how can I obtain what serial was generated for the insert I'm doing? I could just do another query for max(id) .. where id is my serial field.. but I'm worried another insert could have already came in.

Travis

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-05-27 20:52:31 Re: How to obtain serial generate when doing an insert?
Previous Message dan radom 2003-05-27 20:35:27 Re: Postgresql on SUN Server