Re: Custom type literal conversion

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Custom type literal conversion
Дата
Msg-id CAKrjmhe9v-PnN+LcptjqcDvVDCgDXrdM9mBJYbjczN6oMwMOZw@mail.gmail.com
обсуждение исходный текст
Ответ на Custom type literal conversion  (Chris Bandy <bandy.chris@gmail.com>)
Ответы Re: Custom type literal conversion  (Chris Bandy <bandy.chris@gmail.com>)
Список pgsql-general
On Wed, Sep 24, 2014 at 2:45 PM, Chris Bandy <bandy.chris@gmail.com> wrote:
I would like to create a new type for version strings that sorts numerically. The composite type below was quick to write and does not require superuser privileges. However, it doesn't respond to type casts the way I'd like.

Is there a way to implement this type's literal conversion without resorting to a base type?

I think you need to define casts too, but in any way - check if "semver" extension (available on pgxn) doesn't solve your problem.

depesz

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

Предыдущее
От: Chris Bandy
Дата:
Сообщение: Custom type literal conversion
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: JSONB spaces in text presentation