Re: help defining a basic type operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: help defining a basic type operator
Date: 2018-08-20 15:29:22
Message-ID: 19752.1534778962@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luca Ferrari <fluca1978(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nicolas Paris 2018-08-20 15:56:01 Re: Multiple COPY on the same table
Previous Message Luca Ferrari 2018-08-20 15:24:20 Re: help defining a basic type operator