Re: Obtaining a limited number of records from a long query
От | Oliveiros Cristina |
---|---|
Тема | Re: Obtaining a limited number of records from a long query |
Дата | |
Msg-id | 027f01c9dd44$054655e0$ec5a3d0a@marktestcr.marktest.pt обсуждение исходный текст |
Ответ на | Obtaining a limited number of records from a long query ("Oliveiros Cristina" <oliveiros.cristina@marktest.pt>) |
Ответы |
Re: Obtaining a limited number of records from a long query
|
Список | pgsql-sql |
Thank you for pointing it out, Ivan. The query I am trying to restrict output for happens to be an ORDER BY query. Actually I wasn't aware of this detail. I'll leave a mental note for myself that results might be unexpected for not ORDER BY queries Best, Oliveiros ----- Original Message ----- From: "Ivan Sergio Borgonovo" <mail@webthatworks.it> To: <pgsql-sql@postgresql.org> Sent: Monday, May 25, 2009 3:13 PM Subject: Re: [SQL] Obtaining a limited number of records from a long query > On Mon, 25 May 2009 14:55:54 +0100 > "Oliveiros Cristina" <oliveiros.cristina@marktest.pt> wrote: > >> >> >> Thanks a million, Andy. >> >> It's precisely what I needed, Indeed! > > Beware: unless you specify an ORDER BY (and you expect no other > record is inserted between one query and the other... or you just > don't care) you may incur in unexpected results. > > A query without an order by is not granted to return the result in > the same order. > > If you can (same session) you may use cursors. > > > -- > Ivan Sergio Borgonovo > http://www.webthatworks.it > > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql >
В списке pgsql-sql по дате отправления: