pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bart Degryse <Bart.Degryse@indicator.be>
To: Nacef LABIDI <nacef.l@gmail.com>
To: Craig Ringer <craig@postnewspapers.com.au>
Cc: pgsql-sql@postgresql.org
Cc: Roland Voegtli <voegtli@scnat.ch>
Subject: Re: After updating dataset the record goes to the end of thedataset
Date: Tue, 22 Apr 2008 14:56:00 +0200
Message-ID: <480DFC7F.A3DD.0030.0@indicator.be> (raw)
In-Reply-To: <480DDE26.50405@postnewspapers.com.au>
References: <f16f7ea00804220254i671e446au7c50dca45dea10d7@mail.gmail.com>
	<3 B256469-4A00-44C3-8EB8-F49FA9F7259A@scnat.ch>
	<f16f7ea00804220310m26753072me c98ef0bc6bb2c9e@mail.gmail.com>
	<f16f7ea00804220310m26753072mec98ef0bc6bb2c9 e@mail.gmail.com>
	<480DDE26.50405@postnewspapers.com.au>

Probably what you mean is that you want the order in which the records were 
originally inserted into the database. In that case add a serial to your table and
fetch the records like
SELECT * FROM tbl WHERE 1=1 ORDER BY [myserialfield]
It's not foolproof but will in many cases come close to what you seem to be trying 
to achieve by not using 'order by'.

Nacef LABIDI wrote:
> Yes I don't issue any sort statement, and I indeed want the data to be show
> as it is stored in the database.

view thread (13+ messages)  latest in thread

Message-ID: <480DFC7F.A3DD.0030.0@indicator.be>
Permalink:  ../480DFC7F.A3DD.0030.0@indicator.be/
Also on:    postgresql.org/message-id/480DFC7F.A3DD.0030.0@indicator.be

 · 

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: Bart.Degryse@indicator.be, nacef.l@gmail.com, craig@postnewspapers.com.au, voegtli@scnat.ch
  Subject: Re: After updating dataset the record goes to the end of thedataset
  In-Reply-To: <480DFC7F.A3DD.0030.0@indicator.be>

* 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