pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Artz <mlartz@gmail.com>
To: Bruno Wolff III <bruno@wolff.to>
To: Michael Artz <mlartz@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Storing an ordered list
Date: Wed, 26 Jul 2006 20:13:03 -0400
Message-ID: <e9c163070607261713j21d8e9a1n2e2ea25bd30de39c@mail.gmail.com> (raw)
In-Reply-To: <20060726203954.GA23437@wolff.to>
References: <e9c163070607251958x2ef2a315w4204aa2f90e70bbe@mail.gmail.com>
	<20060726203954.GA23437@wolff.to>

On 7/26/06, Bruno Wolff III <bruno@wolff.to> wrote:
> If you use numeric instead of int, then it is easy to insert new values.

Hmm, hadn't thought about that.  How would you normally implement it?
I'm thinking that, if I wanted to insert between A and B, I could take
(A.order + B.order)/2, which would be pretty simple.  Is there a
better way?



view thread (7+ messages)  latest in thread

Message-ID: <e9c163070607261713j21d8e9a1n2e2ea25bd30de39c@mail.gmail.com>
Permalink:  ../e9c163070607261713j21d8e9a1n2e2ea25bd30de39c@mail.gmail.com/
Also on:    postgresql.org/message-id/e9c163070607261713j21d8e9a1n2e2ea25bd30de39c@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mlartz@gmail.com, bruno@wolff.to
  Subject: Re: Storing an ordered list
  In-Reply-To: <e9c163070607261713j21d8e9a1n2e2ea25bd30de39c@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox