pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Sawtell <csawtell@paradise.net.nz>
To: Kovacs Baldvin <kb136@hszk.bme.hu>
Cc: pgsql-sql@postgresql.org
Subject: Re: Number the lines
Date: 19 Sep 2001 10:54:26 +1200
Message-ID: <20010918225449.C87FF1F9EEB@deborah.paradise.net.nz> (raw)
In-Reply-To: <Pine.GSO.4.33.0109171446130.8732-100000@ural2>

On 17 Sep 2001 14:54:51 +0200, Kovacs Baldvin wrote:
> Hi!
> 
> I am in the university now, not be able to test what I
> say, so please forgive me if it is buggy or wrong.
> 
> So does it helps you?:


That works correctly. Thanks very much for the tip
.
Do not forget to DROP the sequence afterwards, otherwise you will
find the line numbers continuing the sequence in the next SELECT
statement.

> CREATE SEQUENCE ordering;
> SELECT NEXTVAL('ordering') as rownumber, *
>   INTO TABLE anewname FROM whatyouwant;
> 
> Probably CREATE SEQUENCE 'ordering';, do try it...


No, you do not need the quote characters. 

Sincerely etc.. C.





view thread (6+ messages)

Message-ID: <20010918225449.C87FF1F9EEB@deborah.paradise.net.nz>
Permalink:  ../20010918225449.C87FF1F9EEB@deborah.paradise.net.nz/
Also on:    postgresql.org/message-id/20010918225449.C87FF1F9EEB@deborah.paradise.net.nz

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: csawtell@paradise.net.nz, kb136@hszk.bme.hu
  Subject: Re: Number the lines
  In-Reply-To: <20010918225449.C87FF1F9EEB@deborah.paradise.net.nz>

* 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