Re: Implementing an expanded object in C

From: Michel Pelletier <pelletier(dot)michel(at)gmail(dot)com>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Implementing an expanded object in C
Date: 2019-02-06 18:56:44
Message-ID: CACxu=vJXGuq4gY_TJv8C=uLKiVE=4vB2zKzH14CBa9SP5k3yiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)tao11(dot)riddles(dot)org(dot)uk>
wrote:

> >>>>> "Michel" == Michel Pelletier <pelletier(dot)michel(at)gmail(dot)com> 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)
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason W 2019-02-06 20:37:41 How to find out tables that are frequently read/ write?
Previous Message Adrian Klaver 2019-02-06 16:43:24 Re: Connection issue