Received: from jupiter.hub.org (jupiter.hub.org [64.49.215.5]) by postgresql.org (Postfix) with ESMTP id 56999476740 for ; Mon, 11 Mar 2002 18:05:41 -0500 (EST) Received: (from news@localhost) by jupiter.hub.org (8.11.6/8.11.6) id g2BMt6f77347 for pgsql-sql@postgresql.org; Mon, 11 Mar 2002 16:55:06 -0600 (CST) (envelope-from news) From: Hubert Palme X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Line Numbering in SELRCT Output Date: Mon, 11 Mar 2002 23:55:04 +0100 Organization: None Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: news@hub.org User-Agent: KNode/0.4 To: pgsql-sql@postgresql.org X-Archive-Number: 200203/164 X-Sequence-Number: 7044 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