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 3434B9DCDE4 for ; Thu, 12 Jan 2006 16:04:04 -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 62783-06 for ; Thu, 12 Jan 2006 16:04:03 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id ABD2D9DCDCC for ; Thu, 12 Jan 2006 16:03:57 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k0CK3j9o010338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Jan 2006 13:03:47 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id k0CK3j6C079501; Thu, 12 Jan 2006 13:03:45 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id k0CK3iox079500; Thu, 12 Jan 2006 13:03:44 -0700 (MST) (envelope-from mfuhr) Date: Thu, 12 Jan 2006 13:03:44 -0700 From: Michael Fuhr To: Kashyap Jani Cc: pgsql-interfaces Subject: Re: Getting data where select has a limit criteria Message-ID: <20060112200344.GA55632@winnie.fuhr.org> References: <43C67A38.3070406@cognitronics.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43C67A38.3070406@cognitronics.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.094 required=5 tests=[AWL=0.094] X-Spam-Score: 0.094 X-Spam-Level: X-Archive-Number: 200601/28 X-Sequence-Number: 5944 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? -- Michael Fuhr