Re: help defining a basic type operator - Mailing list pgsql-general

From Tom Lane
Subject Re: help defining a basic type operator
Date
Msg-id 19616.1534776705@sss.pgh.pa.us
Whole thread Raw
In response to help defining a basic type operator  (Luca Ferrari <fluca1978@gmail.com>)
Responses Re: help defining a basic type operator
List 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 by date:

Previous
From: Luca Ferrari
Date:
Subject: help defining a basic type operator
Next
From: Ravi Krishna
Date:
Subject: