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 19752.1534778962@sss.pgh.pa.us
Whole thread Raw
In response to Re: help defining a basic type operator  (Luca Ferrari <fluca1978@gmail.com>)
List pgsql-general
Luca Ferrari <fluca1978@gmail.com> writes:
> Fixing the type creation into:

> CREATE TYPE hfsize (
>        internallength = 16,
>        input  = hfsize_input_function,
>        output = hfsize_output_function
> );

> solved the problem, so it was a length mismatch.

You really need to specify double alignment too; IIRC the default
assumption is only "int" alignment.  Intel processors will usually let you
get away with being sloppy about that, but it's still wrong (and there
*are* cases where Intel will complain too).

            regards, tom lane


pgsql-general by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: help defining a basic type operator
Next
From: Nicolas Paris
Date:
Subject: Re: Multiple COPY on the same table