Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Selecting rows with "static" ordering



> 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 



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group