Re: Does Postgresql have a similar pseudo-column "ROWNUM" as - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: Does Postgresql have a similar pseudo-column "ROWNUM" as
Date
Msg-id 1116614578.31821.201.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: Does Postgresql have a similar pseudo-column "ROWNUM" as  ("Keith Worthington" <keithw@narrowpathinc.com>)
List pgsql-sql
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. :)


pgsql-sql by date:

Previous
From: John DeSoi
Date:
Subject: Re: How do I quit in the middle of a SQL script?
Next
From: "Mark Fenbers"
Date:
Subject: DBD::Pg on Enterprise 3