Re: Selecting rows with "static" ordering

Поиск
Список
Период
Сортировка
От chester c young
Тема Re: Selecting rows with "static" ordering
Дата
Msg-id 1266.67652.qm@web54315.mail.yahoo.com
обсуждение исходный текст
Ответ на Selecting rows with "static" ordering  (Steve Midgley <public@misuse.org>)
Список 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 по дате отправления:

Предыдущее
От: "Phillip Smith"
Дата:
Сообщение: Re: Selecting rows with "static" ordering
Следующее
От: "Aaron Bono"
Дата:
Сообщение: Re: Selecting rows with "static" ordering