X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id DDD66D1D08B for ; Wed, 21 Apr 2004 14:48:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 55425-09 for ; Wed, 21 Apr 2004 14:48:05 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 553C7D1B88F for ; Wed, 21 Apr 2004 14:47:59 -0300 (ADT) Received: (qmail 30766 invoked by uid 500); 21 Apr 2004 17:51:54 -0000 Date: Wed, 21 Apr 2004 12:51:54 -0500 From: Bruno Wolff III To: Gergely Czuczy Cc: Michael Stephenson , Kenneth Suralta , pgsql-interfaces@postgresql.org Subject: Re: help on SQL Message-ID: <20040421175154.GA30712@wolff.to> Mail-Followup-To: Gergely Czuczy , Michael Stephenson , Kenneth Suralta , pgsql-interfaces@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/55 X-Sequence-Number: 4876 On Wed, Apr 21, 2004 at 12:21:32 +0200, Gergely Czuczy wrote: > hello > > what you have done is not the thing that was asked. you've retrieved every > row that has a spacial value(data-1 %3). the request was to retrieve every > 3rd row. the difference is that, the 'every Nth' row has nothing to do > with the value of any field in the row. try to retrieve every Nth row from > a query where there are no integer values, only timestamps and string. or > try to do your method where the integer value is not continous. Rows do not have any order. Unless you define the ordering you want in terms of same data in the rows there is no every other row. If you can order the rows (no randomly breaking ties) then you can get the number of the row in this ordering (though not by a very efficient method) and select rows based on the this number.