Re: Using generate_series to create a unique ID in a query? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Using generate_series to create a unique ID in a query?
Date
Msg-id 20071114095926.GA5891@depesz.com
Whole thread Raw
In response to Using generate_series to create a unique ID in a query?  (Sarah Dougherty <sdougherty@desc.org>)
Responses Re: Using generate_series to create a unique ID in a query?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, Nov 12, 2007 at 03:11:50PM -0800, Sarah Dougherty wrote:
> To recap with an example, the query below works fine, but how do I add a
> series to it?

generate_series will not help with this.
try the sequence approach, or this:
http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative-sum-in-one-query/

best regards,

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

pgsql-general by date:

Previous
From: Willem Buitendyk
Date:
Subject: Re: Bulk Load Ignore/Skip Feature
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Client-requested cast mode to emulate Pg8.2 on v8.3