Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnxN9-0006f3-B7 for pgsql-general@arkaria.postgresql.org; Mon, 28 Jan 2019 03:14:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gnxN7-00085j-DF for pgsql-general@arkaria.postgresql.org; Mon, 28 Jan 2019 03:14:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnxN7-00085c-2G for pgsql-general@lists.postgresql.org; Mon, 28 Jan 2019 03:14:05 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnxN4-0006zF-72 for pgsql-general@postgresql.org; Mon, 28 Jan 2019 03:14:04 +0000 Received: from [192.168.127.1] (port=65382 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1gnxN0-0001LI-W6; Mon, 28 Jan 2019 03:13:59 +0000 Received: from [127.0.0.1] (port=16730 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1gnxN0-000CED-AT; Mon, 28 Jan 2019 03:13:58 +0000 From: Andrew Gierth To: Michel Pelletier Cc: pgsql-general@postgresql.org Subject: Re: Implementing an expanded object in C In-Reply-To: (Michel Pelletier's message of "Sun, 27 Jan 2019 14:26:04 -0800") Message-ID: <87bm41jxjp.fsf@news-spur.riddles.org.uk> References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 28 Jan 2019 03:13:57 +0000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Michel" == Michel Pelletier writes: Michel> Replying to my own problem here, I guess this was a situation Michel> where explaining it in detail revealed the problem to me. By Michel> specifying my type is 'passedbyvalue' That cannot possibly be appropriate. Michel> CREATE TYPE matrix ( Michel> internallength = 8, Your type is clearly not a fixed-length type, because fixed-length types cannot have expanded datums. A fixed-length type must contain its entire representation within the fixed length - it is not allowed to be a pointer to something else. -- Andrew (irc:RhodiumToad)