Re: New record position

From: "Greg Patnude" <gpatnude(at)hotmail(dot)com>
To: "'Chris Browne'" <cbbrowne(at)acm(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: New record position
Date: 2005-03-31 16:42:53
Message-ID: BAY14-DAV12DCBD187D6EAEDE838034D7470@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

There's a difference between "natural" order (the location in the database
or on disk) and "record" order (the order specified by the primary key)...

-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org]
On Behalf Of Chris Browne
Sent: Wednesday, March 30, 2005 3:04 PM
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] New record position

lucas(at)presserv(dot)org writes:
> Why it? I can't undestand why the new record location was change.
Shouldn't it
> apper at the LAST record???
> What need I do??

SQL only imposes an order on the return set if you add an "ORDER BY"
clause.

You can't expect any particular order to either recur or NOT recur
unless you have specifically requested a particular ordering.

There's no bug; just use ORDER BY if you need to, and, if you don't,
make sure you don't expect any particular ordering...
--
(format nil "~S(at)~S" "cbbrowne" "cbbrowne.com")
http://www3.sympatico.ca/cbbrowne/spiritual.html
"The present need for security products far exceeds the number of
individuals capable of designing secure systems. Consequently,
industry has resorted to employing folks and purchasing "solutions"
from vendors that shouldn't be let near a project involving securing a
system." -- Lucky Green

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Browne 2005-03-31 17:33:49 Re: New record position
Previous Message Dinesh Pandey 2005-03-31 12:44:30 Re: Speed up slow select - was gone blind