Re: Transactions and insertion ordering

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: James Pharaoh <james(at)pharaohsystems(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Transactions and insertion ordering
Date: 2004-06-10 13:47:34
Message-ID: 20040610134734.GA17187@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 10, 2004 at 20:15:53 +1000,
Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
> nextval() should return value in the order they were called, rather
> than commit time. I hope you're not relying on the unordered results of
> a table scan remaining stable. Tables have no intrinsic "order", only
> one inposed by an external sequence.

This isn't really guarenteed with nextval. I think it will work if you
are just reserving one value at a time (which is the default).

I think the real problem is that the original poster needs to precisely
define what determines order. If the precise definition is transaction
commit order, I think that is going to be hard to do exactly right.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Franco Bruno Borghesi 2004-06-10 13:49:34 Re: Record order change after update
Previous Message Karsten Hilbert 2004-06-10 11:51:44 Re: Postgresql vs. aggregates