Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frm7V-0005PB-1g for pgsql-general@arkaria.postgresql.org; Mon, 20 Aug 2018 15:29:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frm7T-0008Jv-2r for pgsql-general@arkaria.postgresql.org; Mon, 20 Aug 2018 15:29:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frm7S-0008Jo-Nb for pgsql-general@lists.postgresql.org; Mon, 20 Aug 2018 15:29:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frm7Q-0004I0-81 for pgsql-general@postgresql.org; Mon, 20 Aug 2018 15:29:25 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7KFTMM4008751; Mon, 20 Aug 2018 11:29:23 -0400 From: Tom Lane To: Luca Ferrari cc: pgsql-general Subject: Re: help defining a basic type operator In-reply-to: References: <19616.1534776705@sss.pgh.pa.us> Comments: In-reply-to Luca Ferrari message dated "Mon, 20 Aug 2018 17:24:20 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19751.1534778962.1@sss.pgh.pa.us> Date: Mon, 20 Aug 2018 11:29:22 -0400 Message-ID: <19752.1534778962@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Luca Ferrari 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