X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 88CE05284E for ; Fri, 20 May 2005 15:42:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55100-09 for ; Fri, 20 May 2005 18:42:35 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id AB99F5282B for ; Fri, 20 May 2005 15:42:34 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 20 May 2005 13:42:58 -0500 Subject: Re: Does Postgresql have a similar pseudo-column "ROWNUM" as From: Scott Marlowe To: KeithW@narrowpathinc.com Cc: pgsql-sql@postgresql.org In-Reply-To: <20050520181514.M54654@narrowpathinc.com> References: <1116349263.22291.129.camel@state.g2switchworks.com> <20050520181514.M54654@narrowpathinc.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1116614578.31821.201.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 20 May 2005 13:42:58 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/171 X-Sequence-Number: 21484 On Fri, 2005-05-20 at 13:27, Keith Worthington wrote: > Scott, > > I realize that this thread went off in another direction however your > suggestion proved very helpful for a problem that I was trying to solve. I > wanted the row number of a set returned by a function. Here is a chopped > version of the function that I wrote. > > CREATE OR REPLACE FUNCTION func_bom(integer, integer) > RETURNS SETOF func_bom AS SNIP > Although I have no need to limit the output I tried it just for giggles and it > worked fine. > > SELECT * FROM func_bom(12345, 1) WHERE subline between 4 AND 6; You're welcome. I've saved that off to my ~/pgsql directory for future use. So, the thanks are back to you. :)