pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliveiros Cristina <oliveiros.cristina@marktest.pt>
To: Ivan Sergio Borgonovo <mail@webthatworks.it>
To: pgsql-sql@postgresql.org
Subject: Re: Obtaining a limited number of records from a long query
Date: Mon, 25 May 2009 15:20:57 +0100
Message-ID: <027f01c9dd44$054655e0$ec5a3d0a@marktestcr.marktest.pt> (raw)
References: <020201c9dd3d$372c3f40$ec5a3d0a@marktestcr.marktest.pt>
	<4A1AA0FA.1070507@networkmail.eu>
	<025501c9dd40$86155440$ec5a3d0a@marktestcr.marktest.pt>
	<20090525161347.166789ac@dawn.webthatworks.it>

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
> 




view thread (8+ messages)  latest in thread

Message-ID: <027f01c9dd44$054655e0$ec5a3d0a@marktestcr.marktest.pt>
Permalink:  ../027f01c9dd44$054655e0$ec5a3d0a@marktestcr.marktest.pt/
Also on:    postgresql.org/message-id/027f01c9dd44$054655e0$ec5a3d0a@marktestcr.marktest.pt

 · 

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: oliveiros.cristina@marktest.pt, mail@webthatworks.it
  Subject: Re: Obtaining a limited number of records from a long query
  In-Reply-To: <027f01c9dd44$054655e0$ec5a3d0a@marktestcr.marktest.pt>

* 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