From: Michael Fuhr <mike@fuhr.org>
To: Kashyap Jani <kjani@cognitronics.com>
Cc: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: Getting data where select has a limit criteria
Date: Thu, 12 Jan 2006 13:03:44 -0700
Message-ID: <20060112200344.GA55632@winnie.fuhr.org> (raw)
In-Reply-To: <43C67A38.3070406@cognitronics.com>
References: <43C67A38.3070406@cognitronics.com>
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?
--
Michael Fuhr
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: mike@fuhr.org, kjani@cognitronics.com
Subject: Re: Getting data where select has a limit criteria
In-Reply-To: <20060112200344.GA55632@winnie.fuhr.org>
* 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