Re: New record position

Поиск
Список
Период
Сортировка
От Greg Patnude
Тема Re: New record position
Дата
Msg-id BAY14-DAV12DCBD187D6EAEDE838034D7470@phx.gbl
обсуждение исходный текст
Ответ на Re: New record position  (Chris Browne <cbbrowne@acm.org>)
Список 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@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Chris Browne
Sent: Wednesday, March 30, 2005 3:04 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] New record position

lucas@presserv.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@~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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Lin Kun Hsin"
Дата:
Сообщение: Re: A SQL Question About distinct, limit, group by, having, aggregate
Следующее
От: Chris Browne
Дата:
Сообщение: Re: New record position