Re: Custom Base Type in C

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Toby Chavez <odnamr(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Custom Base Type in C
Date: 2008-05-07 23:15:10
Message-ID: 20080507231509.GU20150@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dan "Heron" Myers 2008-05-07 23:29:32 Using a composite SQL type in C
Previous Message David Wilson 2008-05-07 23:12:56 Re: Custom Base Type in C