pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Luis C. Ferreira <lferreira@ciudad.com.ar>
To: pgsql-sql@postgresql.org
Subject: Re: enumerating rows
Date: Thu, 12 Apr 2001 03:05:36 -0300
Message-ID: <9b3g5k$1iq6$1@news.tht.net> (raw)
References: <Pine.LNX.4.21.0104111357510.3543-100000@pc10.radnoti-szeged.sulinet.hu>


Try this....

CREATE SEQUENCE just_a_seq;
Select nextval('just_a_seq') as row_no, * from pg_tables ;
drop SEQUENCE just_a_seq;

>
> row_no | column1 | column2 | ...
> -------+---------+---------+ ...
>      1 | datum11 | datum12 | ...
>      2 | datum21 | datum22 | ...
>    ... |     ... |     ... | ...
>
> I didn't find anything in the docs.
>
> TIA, Zoltan
>







view thread (12+ messages)  latest in thread

Message-ID: <9b3g5k$1iq6$1@news.tht.net>
Permalink:  ../9b3g5k$1iq6$1@news.tht.net/
Also on:    postgresql.org/message-id/9b3g5k$1iq6$1@news.tht.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: lferreira@ciudad.com.ar
  Subject: Re: enumerating rows
  In-Reply-To: <9b3g5k$1iq6$1@news.tht.net>
  References: <Pine.LNX.4.21.0104111357510.3543-100000@pc10.radnoti-szeged.sulinet.hu> <9b3g5k$1iq6$1@news.tht.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox