Re: Order by lower(column-alias) doesn't work...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Order by lower(column-alias) doesn't work...
Дата
Msg-id 6288.1590672402@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Order by lower(column-alias) doesn't work...  (Andreas Joseph Krogh <andreas@visena.com>)
Ответы Re: Order by lower(column-alias) doesn't work...
Список pgsql-general
Andreas Joseph Krogh <andreas@visena.com> writes:
> Is there a way to define "sorting-rules" on custom-types so that I can have
> ORDER BY <my_array_of_custom_types_alias> and PG will pick my custom odering?

You'd have to write your own type, which would be a lotta work :-(.

A possible partial answer is to define the composite type as

    firstname citext, lastname citext, other-fields-here

and then the regular composite-type comparison rule would give you
approximately what you said you wanted ... but only approximately.

            regards, tom lane



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

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Order by lower(column-alias) doesn't work...
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Order by lower(column-alias) doesn't work...