Re: Selecting rows with "static" ordering

From: chester c young <chestercyoung(at)yahoo(dot)com>
To: Steve Midgley <public(at)misuse(dot)org>
Cc: sql pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Selecting rows with "static" ordering
Date: 2007-04-27 00:35:43
Message-ID: 1266.67652.qm@web54315.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Aaron Bono 2007-04-27 00:46:58 Re: Selecting rows with "static" ordering
Previous Message Phillip Smith 2007-04-27 00:27:41 Re: Selecting rows with "static" ordering