Re: Getting data where select has a limit criteria

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Kashyap Jani <kjani(at)cognitronics(dot)com>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Getting data where select has a limit criteria
Date: 2006-01-12 20:03:44
Message-ID: 20060112200344.GA55632@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Fuhr 2006-01-12 20:27:45 Re: [libpq] Password authentication failed for user
Previous Message Kashyap Jani 2006-01-12 15:48:08 Getting data where select has a limit criteria