Re: Custom Base Type in C

Поиск
Список
Период
Сортировка
От Toby Chavez
Тема Re: Custom Base Type in C
Дата
Msg-id a2987f9e0805071714l7f1906a4ie6781e210214e4d4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Custom Base Type in C  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
If I make it pass-by-reference and varlena do I have to worry about TOASTing and deTOASTing everying in my INPUT and OUTPUT functions?

 
On Wed, May 7, 2008 at 5:15 PM, Alvaro Herrera <alvherre@commandprompt.com> wrote:
Toby Chavez escribió:

> My custom type needs to have one biginteger and one text value... pretty
> straight forward. I guess my first question is if there are any examples out
> there that do something similar. I have looked extensively through the
> contrib directory and can't find anything very helpful. If not, could
> someone help me understand what my c struct would look like and what values
> I need for INTERNALLENGTH, ALIGNMENT, STORAGE, etc in the CREATE TYPE
> command?

Probably what's biting you is that the type needs to be
pass-by-reference and varlena.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: "Toby Chavez"
Дата:
Сообщение: Re: Custom Base Type in C
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Feature request/suggestion - CREATE SCHEMA LIKE