Re: Implementing an expanded object in C

Поиск
Список
Период
Сортировка
От Michel Pelletier
Тема Re: Implementing an expanded object in C
Дата
Msg-id CACxu=vJXGuq4gY_TJv8C=uLKiVE=4vB2zKzH14CBa9SP5k3yiw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Implementing an expanded object in C  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список 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@tao11.riddles.org.uk> wrote:
>>>>> "Michel" == Michel Pelletier <pelletier.michel@gmail.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)

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Connection issue
Следующее
От: Jason W
Дата:
Сообщение: How to find out tables that are frequently read/ write?