Re: How do I select the last Id in a column??? - Mailing list pgsql-admin

From Josh Goldberg
Subject Re: How do I select the last Id in a column???
Date
Msg-id 02a101c33cce$7af916a0$6e02a8c0@4dmatrix.com
Whole thread Raw
In response to How do I select the last Id in a column???  (Michael Kovalcik <makd32@yahoo.com>)
Responses Re: How do I select the last Id in a column???
Re: How do I select the last Id in a column???
List pgsql-admin
What could cause a table to act serialized when read committed transactions
are set in the configuration?  That is something I am running into, which
provoked my [incorrect] example.

From: "Bruno Wolff III" <bruno@wolff.to>
Sent: Thursday, June 26, 2003 4:30 PM
> On Thu, Jun 26, 2003 at 14:00:33 -0700,
>   Josh Goldberg <josh@4dmatrix.com> wrote:
> > to get the last record inserted just
> > select * from row order by autoincId desc limit 1;
> >
> > if you have several clients doing this you might want to put your insert
and
> > the select inside a transaction.
>
> That won't help. Your suggestion will only work in serializable
transactions.
>
> In read committed mode the select might see a value for autoincId from
> a transaction that committed between the insert and the select.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>


pgsql-admin by date:

Previous
From: Sam Barnett-Cormack
Date:
Subject: Re: A problem
Next
From: Tom Haddon
Date:
Subject: Japanese Character Support