pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kashyap Jani <kjani@cognitronics.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: Getting data where select has a limit criteria
Date: Thu, 12 Jan 2006 18:18:00 -0500
Message-ID: <43C6E3A8.7050904@cognitronics.com> (raw)
In-Reply-To: <20060112200344.GA55632@winnie.fuhr.org>
References: <43C67A38.3070406@cognitronics.com>
	<20060112200344.GA55632@winnie.fuhr.org>

Michael Fuhr wrote:

>On Thu, Jan 12, 2006 at 10:48:08AM -0500, Kashyap Jani wrote:
>  
>
>>   I am trying to issue a query like "SELECT * from <some table> limit 
>>30". In psql command line interface it displays only 30 rows at a time. 
>>    
>>
>
>With LIMIT 30 psql should display only 30 rows altogether ("30 rows
>at a time" suggests that you're getting more than 30 rows -- are
>you?).
>
>  
>
>>How will it behave if I use libpq. Is it going to return me only 30 rows ?
>>    
>>
>
>If you put LIMIT 30 in the query then you should get at most 30
>rows.  What happened when you tried it?
>
>  
>
Thanks Michael,
    I returned 30 records back. I wasn't sure how it will work and 
thought I could just ask instead of actually writing a sample test 
program... But I ended up witting a sample program anyway..

Regards,
Kashyap




view thread (3+ messages)

Message-ID: <43C6E3A8.7050904@cognitronics.com>
Permalink:  ../43C6E3A8.7050904@cognitronics.com/
Also on:    postgresql.org/message-id/43C6E3A8.7050904@cognitronics.com

 · 

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-interfaces@postgresql.org
  Cc: kjani@cognitronics.com, mike@fuhr.org
  Subject: Re: Getting data where select has a limit criteria
  In-Reply-To: <43C6E3A8.7050904@cognitronics.com>

* 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