Thanks Andrew, sorry for my late reply it took me a while to get time to analyze the issue.
You are of course correct, I had confusion around the create type statement, but the good news is, I have figured out the final ins and outs of creating an expanded type, and my matrix type can now be used as variables plpgsql functions and works great! Thanks to you and Tom and everyone else who helped me get unblocked and making progress.
-Michel
On Sun, Jan 27, 2019 at 7:14 PM Andrew Gierth <andrew@xxxxxxxxxxxxxxxxxxxx> wrote:
>>>>> "Michel" == Michel Pelletier <pelletier.michel@xxxxxxxxx> 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)