Re: Multi calendar system for pgsql

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Mohsen Alimomeni <m(dot)alimomeni(at)gmail(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Multi calendar system for pgsql
Date: 2009-02-22 14:22:30
Message-ID: 87skm6v9eh.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mohsen Alimomeni <m(dot)alimomeni(at)gmail(dot)com> writes:

> Hi,
> To implement my local calendar, I tried adding a new type (pdate) to pgsql
> as an extension. At first I used a struct of size 6, and I returned a
> pointer to it in pdate_in with no problem. Now I changed the type to int32,
> returning PG_RETURN_INT32. I removed all palloc calls. but the server
> crashes with segmentation fault before returning in pdate_in.

You want to set PASSEDBYVALUE

(And you probably want to adjust alignment though I don't think it's causing
any problem aside from wasted space)

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-02-22 14:27:33 some broken on pg_stat_user_functions
Previous Message Mohsen Alimomeni 2009-02-22 13:28:21 Re: Multi calendar system for pgsql