From: Tom Lane <tgl@sss.pgh.pa.us>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: help defining a basic type operator
Date: Mon, 20 Aug 2018 11:29:22 -0400
Message-ID: <19752.1534778962@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKoxK+49nTLbUxiOBYF-KYT51Y9eFvQbv_w7kJP6LgfSZ3bQkg@mail.gmail.com>
References: <CAKoxK+6huo++-LL50d-5qvST94cFKpNR4_qZnEqDYZfbvbXBPQ@mail.gmail.com>
<19616.1534776705@sss.pgh.pa.us>
<CAKoxK+49nTLbUxiOBYF-KYT51Y9eFvQbv_w7kJP6LgfSZ3bQkg@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, fluca1978@gmail.com
Subject: Re: help defining a basic type operator
In-Reply-To: <19752.1534778962@sss.pgh.pa.us>
References: <CAKoxK+6huo++-LL50d-5qvST94cFKpNR4_qZnEqDYZfbvbXBPQ@mail.gmail.com> <19616.1534776705@sss.pgh.pa.us> <CAKoxK+49nTLbUxiOBYF-KYT51Y9eFvQbv_w7kJP6LgfSZ3bQkg@mail.gmail.com> <19752.1534778962@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox