Re: increment counter in VIEW

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Oleg <evdakov(at)iwg(dot)uka(dot)de>, pgsql-novice(at)postgresql(dot)org
Subject: Re: increment counter in VIEW
Date: 2006-07-12 12:05:30
Message-ID: 20060712120530.6501.qmail@web31802.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


> Dear All,
> Does anybody know how to add increment counter column to VIEW? To get
> something like this
>
> cntrColumn | anotherCol
> ------------------------
> 1 | val1
> 2 | val2
> 3 | ..
> 4 |
>
> The best if this counter will be executed together with sort to ensure
> that sertain record gets always the same Counter value.

I am not sure if generate_series is what you want.
http://www.postgresql.org/docs/8.1/interactive/functions-srf.html

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Oleg 2006-07-12 15:03:01 Re: increment counter in VIEW
Previous Message Oleg 2006-07-12 11:14:55 increment counter in VIEW