Re: Enumerating a row set - Mailing list pgsql-general

From Marc Mamin
Subject Re: Enumerating a row set
Date
Msg-id C4DAC901169B624F933534A26ED7DF31010A5096@JENMAIL01.ad.intershop.net
Whole thread Raw
In response to Re: Enumerating a row set  (Guy Rouillier <guyr-ml1@burntmail.com>)
List pgsql-general
Hello,

There is also a funny approach here with custom operators and variables
that could be adapted to build a rownum functioanlity in functions
(look for Vladimir)

http://archives.postgresql.org/pgsql-hackers/2008-11/msg00048.php

not very clean, but apparently fast ....

Marc Mamin




-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Guy Rouillier
Sent: Friday, March 27, 2009 2:54 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Enumerating a row set

On Thu, Mar 26, 2009 at 06:42:45PM -0400, George Sakkis wrote:
> Hi all,
>
> Is there a function similiar to Python's enumerate() [1] ? Searching
> the docs didn't reveal any relevant builtin but I hope it's doable in
> pgsql.

I found this via Google:

http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative-sum-
in-one-query/

--
Guy Rouillier

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To
make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Johan Nel
Date:
Subject: Re: Best way to store a threaded message list/tree in SQL
Next
From: Hannes Dorbath
Date:
Subject: PITRTools: Bring up warm standby -> unexpected pageaddr