Re: Implement a new data type

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Implement a new data type
Дата
Msg-id CAFj8pRCdxsrOmrxgm5ZaUA-EkDJat=ZHxeHst8uS0cBnuXCdLA@mail.gmail.com
обсуждение исходный текст
Ответ на Implement a new data type  (mohand oubelkacem makhoukhene <mohand-oubelkacem@outlook.com>)
Ответы Re: Implement a new data type  (Miles Elam <miles.elam@productops.com>)
Список pgsql-general
Hi

út 11. 8. 2020 v 13:31 odesílatel mohand oubelkacem makhoukhene <mohand-oubelkacem@outlook.com> napsal:
Hello;
I whould like to implement a new data type next to char, number, varchar... A Money type.
So i'll have to change the source code, but i don't know which fonctions i need to change and which part to work on.
I need some help to implement this new data type.

If you need to implement just a new data type, then you don't need to modify Postgres source code. You can write your own extension.

For own custom type you need to write minimally "in" and "out" function, and then you can run "CREATE TYPE" statement

one example of custom type can be a extension https://github.com/okbob/pgDecimal

Regards

Pavel


Thank you and best regards
Mohand



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Implement a new data type
Следующее
От: Miles Elam
Дата:
Сообщение: Re: Implement a new data type