From: | "J(dot) Greg Davidson" <jgd(at)well(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: User-defined-type in C crashing PostgreSQL server: |
Date: | 2006-11-20 10:26:44 |
Message-ID: | 1164018404.6173.5.camel@shevek.ifsrad.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Martijn was exactly right! All of the examples I'd been following were
using pass-by-reference, the function call interface is oblivious and I
missed this very important part of the type definition. Yea!
Big thanks,
_Greg
n Sat, 2006-11-18 at 23:15 +0100, Martijn van Oosterhout wrote:
> On Sat, Nov 18, 2006 at 01:07:15PM -0800, J. Greg Davidson wrote:
> > Hello,
> >
> > My user-defined types are crashing the PostgreSQL server and I don't
> > understand why. I've been trying to figure it out on my own for overr
> > a week. I've cooked what I'm doing down to the essentials and I'm
> > asking for help. Help: What am I doing wrong?
>
> This may be a long shot but:
>
> > CREATE TYPE pair (
> > INTERNALLENGTH = 4, -- 32-bits
> > INPUT = pair_in,
> > OUTPUT = pair_out
> > );
>
> You're not specifying PASSEDBYVALUE, so I think postgres is assuming
> you're returning a *pointer* to 4 bytes, so it's dying trying to copy
> it.
>
> Hope this helps,
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Allison | 2006-11-20 11:29:22 | Re: pg_hba.conf |
Previous Message | Magnus Hagander | 2006-11-20 10:16:49 | Re: kerberos authentication error with Windows 2003 SP1 AD |