Re: Custom sort

Поиск
Список
Период
Сортировка
От Artacus
Тема Re: Custom sort
Дата
Msg-id 48A5AAB4.80107@comcast.net
обсуждение исходный текст
Ответ на Re: Custom sort  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-general
>> Can you define a custom sort in postgres? For instance in mysql, you
>> could do something like (I forget the exact syntax)
>>
>> ORDER BY FIND_IN_SET(column_name, ('one','two','three'))
>>
>
> I don't really know this syntax but isn't it something like :
>   ORDER BY column_name='one', column_name='two', column='three'  ?

Thanks all. I'm not sure it's the best solution but,
here's what I ended up doing

ORDER BY strpos(column_name, 'One,Two,Three')

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Horology test failure while compiling PostgreSQL 8.3.3 on Solaris 10 x64
Следующее
От: Reid Thompson
Дата:
Сообщение: Re: Regression failing on build -> ERROR: could not access file "$libdir/plpgsql": No such file or directory