Re: Most efficient way to hard-sort records - Mailing list pgsql-sql

From PFC
Subject Re: Most efficient way to hard-sort records
Date
Msg-id op.s87d3dxscigqcu@apollo13
Whole thread Raw
In response to Re: Most efficient way to hard-sort records  ("Ben K." <bkim@coe.tamu.edu>)
Responses Re: Most efficient way to hard-sort records
List pgsql-sql
> Another version along that line ?
>
> # create sequence counterseq start 1;
> -- (set/reset whenever a counter is needed)
>
> # select main_table.*, nextval('counterseq') as position2
>    into sorted_main_table
>    from main_table, keytable where main_table.id =
>    keytable.main_table_id
>    order by value;
You could also use generate_series(), but I don't know if it can generate  
unbounded series...


pgsql-sql by date:

Previous
From: "Ben K."
Date:
Subject: Re: Most efficient way to hard-sort records
Next
From: Alvaro Herrera
Date:
Subject: Re: Creating nested functions with plpgsql