Re: User-defined-type in C crashing PostgreSQL server: What am I doing wrong?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "J(dot) Greg Davidson" <jgd(at)well(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: User-defined-type in C crashing PostgreSQL server: What am I doing wrong?
Date: 2006-11-18 22:15:07
Message-ID: 20061118221507.GB2228@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2006-11-18 23:34:31 Re: [GENERAL] Allowing SYSDATE to Work
Previous Message J. Greg Davidson 2006-11-18 21:07:15 User-defined-type in C crashing PostgreSQL server: What am I doing wrong?