Re: help defining a basic type operator

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: help defining a basic type operator
Дата
Msg-id 19616.1534776705@sss.pgh.pa.us
обсуждение исходный текст
Ответ на help defining a basic type operator  (Luca Ferrari <fluca1978@gmail.com>)
Ответы Re: help defining a basic type operator  (Luca Ferrari <fluca1978@gmail.com>)
Список pgsql-general
Luca Ferrari <fluca1978@gmail.com> writes:
> I'm trying to define a custom data type that would represent a number
> of bytes in a lossy human way.

You did not show us the SQL definition of the type.  I don't see anything
obviously wrong in what you showed (other than hfsize_add not setting the
result's scaling), so the problem is somewhere else.  Given this C
declaration, the type probably needs to be size 16, double alignment,
pass-by-reference; maybe you messed up part of that?

>   HFSize *sum    = new_HFSize();

What is new_HFSize?

            regards, tom lane


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

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: help defining a basic type operator
Следующее
От: Ravi Krishna
Дата:
Сообщение: