Re: Updating record drops it to the bottom

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: aagha(at)bigfoot(dot)com
Cc: PostgreSQL General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Updating record drops it to the bottom
Date: 2002-11-26 15:19:22
Message-ID: m38yzgfjet.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Aurangzeb M. Agha" <aagha(at)bigfoot(dot)com> writes:

> I've noticed that whenever I update a record in the table and do a select
> * to see my change, that the updated racord has dropped to the bottom of
> the table.
>
> Is there either a) a (simple) way to keep this from happening or b)
> putting the record back where it "belongs" after an update.

Postgres (and most other SQL databases) makes no guarantee about the
order of results from a SELECT unless you use an ORDER BY clause. So
put ORDER BY in your query if you care about the display order.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Gulutzan 2002-11-26 15:30:12 Re: [GENERAL] Bug with sequence
Previous Message Larry Rosenman 2002-11-26 15:17:50 Re: Updating record drops it to the bottom