From: | Adam Haberlach <adam(at)newsnipple(dot)com> |
---|---|
To: | Abe Asghar <abe(at)fish(dot)tm> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: one more word about rules |
Date: | 2000-09-22 17:51:57 |
Message-ID: | 20000922105157.B9319@ricochet.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Sep 22, 2000 at 03:33:46PM +0100, Abe Asghar wrote:
> Hi everyone,
>
> I have built a database that uses int4 as the unique identifier for a news
> database.
>
> Therefore an article has a identifier 1, the next one has 2 etc.
>
> Then I order them when they are displayed on the web reversely so that the
> last article added is at the top of the list.
>
> I now face a major problem. If we need to back dackdate an article - I
> can't. This is because the all the indexes are taken up ie 1, 2, 3......75
> odd records. If I want to add one between 50 and 51 ie 50.5, I cannot
> because the field is an int4.
Perhaps you should store the date of the article in the database, and
then sort by that. You can even set the default for the field to be now() so
that it automatically gets set on insert, and you can override it during
backdate inserts or with later updates...
--
Adam Haberlach | A billion hours ago, human life appeared on
adam(at)newsnipple(dot)com | earth. A billion minutes ago, Christianity
http://www.newsnipple.com | emerged. A billion Coca-Colas ago was
'88 EX500 | yesterday morning. -1996 Coca-Cola Ann. Rpt.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2000-09-22 18:52:44 | Re: Transactions + sequences |
Previous Message | Neil Conway | 2000-09-22 17:43:25 | Transactions + sequences |