Re: Line Numbering in SELRCT Output

From: Hubert Palme <hubert(dot)palme(at)web(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Line Numbering in SELRCT Output
Date: 2002-03-11 22:55:04
Message-ID: a6jck9$2be1$1@jupiter.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Paul wrote:

> CREATE SEQUENCE seq1;
>
> SELECT nextval('seq1'), amname FROM pg_am;
>
> DROP SEQUENCE seq1;
>

Hmm... I forgot to mention that my SELECT statement has an ORDER BY clause.
The sort is done after the sequence numbers being generated. So the order
of the sequence numbers becomes damaged by the sort.

Is there any hint how to avoid this?

--
Hubert Palme Am Walde 1
42119 Wuppertal
<hubert(dot)palme(at)web(dot)de>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Lee Harr 2002-03-12 01:18:38 Re: Referential integrity implementation - bug or user error?
Previous Message knut.suebert 2002-03-11 21:37:25 Re: Pg_dump