X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id CF3979DCE3A for ; Thu, 12 Jan 2006 19:18:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77673-02 for ; Thu, 12 Jan 2006 19:18:13 -0400 (AST) X-Greylist: delayed 07:29:56.220024 by SQLgrey- Received: from mail.cognitronics.com (mail.cognitronics.com [198.151.128.252]) by postgresql.org (Postfix) with ESMTP id 221AD9DCE38 for ; Thu, 12 Jan 2006 19:18:08 -0400 (AST) Received: from [127.0.0.1] ([10.1.0.46]) by mail.cognitronics.com (8.13.0/8.13.0) with ESMTP id k0CNHrOe045234; Thu, 12 Jan 2006 18:17:54 -0500 (EST) Message-ID: <43C6E3A8.7050904@cognitronics.com> Date: Thu, 12 Jan 2006 18:18:00 -0500 From: Kashyap Jani User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Fuhr CC: pgsql-interfaces Subject: Re: Getting data where select has a limit criteria References: <43C67A38.3070406@cognitronics.com> <20060112200344.GA55632@winnie.fuhr.org> In-Reply-To: <20060112200344.GA55632@winnie.fuhr.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.04 required=5 tests=[AWL=0.040] X-Spam-Score: 0.04 X-Spam-Level: X-Archive-Number: 200601/30 X-Sequence-Number: 5946 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 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