Re: Selecting rows with "static" ordering - Mailing list pgsql-sql

From chester c young
Subject Re: Selecting rows with "static" ordering
Date
Msg-id 1266.67652.qm@web54315.mail.yahoo.com
Whole thread Raw
In response to Selecting rows with "static" ordering  (Steve Midgley <public@misuse.org>)
List pgsql-sql
> them in the order they are currently stored in that variable. So take
> 
> for example this foreign application variable:
> 
>    ids = "3,2,5,1,4"


kludgy, but:

1. store your ids in a pg array
2. select from the array
3. on order by, write a function that takes the row.id and array as
parameters, returning the id offset into the array



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


pgsql-sql by date:

Previous
From: "Phillip Smith"
Date:
Subject: Re: Selecting rows with "static" ordering
Next
From: "Aaron Bono"
Date:
Subject: Re: Selecting rows with "static" ordering