Skip site navigation (1) Skip section navigation (2)

Re: Getting data where select has a limit criteria

From: Kashyap Jani <kjani(at)cognitronics(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Getting data where select has a limit criteria
Date: 2006-01-12 23:18:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
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
>>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..


In response to

pgsql-interfaces by date

Next:From: andrew5Date: 2006-01-14 22:54:17
Subject: BUG #2171: Differences compiling plpgsql in ecpg and psql
Previous:From: Michael FuhrDate: 2006-01-12 20:27:45
Subject: Re: [libpq] Password authentication failed for user

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group