Order by provided IDs? - Mailing list pgsql-novice

From Mark Kelly
Subject Order by provided IDs?
Date
Msg-id 201007141903.25271.pgsql@wastedtimes.net
Whole thread Raw
Responses Re: Order by provided IDs?
List pgsql-novice
Hi.

If my query is:

SELECT art_id, art_headline, art_date
FROM article
WHERE art_id IN (357, 344, 120, 258, 369, 195, 343, 370);

can I ask Postgres to return the rows in the order of the IDs in the IN
clause? They are in a specific order defined outside the database.

Thanks,

Mark

pgsql-novice by date:

Previous
From: Greg
Date:
Subject: Re: Extended Query Protocol Question
Next
From: Thomas Kellerer
Date:
Subject: Re: Order by provided IDs?