Is it possible to make the order of output the same as the order of input parameters?

Поиск
Список
Период
Сортировка
От m. hvostinski
Тема Is it possible to make the order of output the same as the order of input parameters?
Дата
Msg-id AANLkTin1qnRa4Bowqcj-4RzEos-Jt2ITkc25kRbz8AZd@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is it possible to make the order of output the same as the order of input parameters?  (Stephen Frost <sfrost@snowman.net>)
Re: Is it possible to make the order of output the same as the order of input parameters?  (Sam Mason <sam@samason.me.uk>)
Re: Is it possible to make the order of output the same as the order of input parameters?  (Andreas Kretschmer <akretschmer@spamfence.net>)
Re: Is it possible to make the order of output the same as the order of input parameters?  (David Fetter <david@fetter.org>)
Список pgsql-general
Hi,

I have a simple query like:

SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10)

The problem is that I need to retrieve the rows in the same order as the set of ids provided in the select statement. Can it be done?

Thanks


В списке pgsql-general по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: create index concurrently - duplicate index to reduce time without an index
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Disable executing external commands from psql?