Re: Problem with composite type creation in C under Linux

From: Marios Vodas <mvodas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with composite type creation in C under Linux
Date: 2011-03-02 17:58:10
Message-ID: AANLkTinG-wk3fBjqgCXPOPgtUdaxZpc5dt72c2v7bB8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you! now I understand it...

On Wed, Mar 2, 2011 at 7:35 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Marios Vodas <mvodas(at)gmail(dot)com> writes:
> > I have developed some custom composite and base types in PostgreSQL 9
> which
> > you can find in the code I provide below.
> > I compile my C library using GCC 4.5 under Linux and Visual Studio 2010
> > under Windows.
>
> > The problem is when I run this command: *SELECT to_composite('((1, 2),
> (3,
> > 4))'::m_segment_base)*.
> > This is the result I get in Windows and Linux respectively:
> > Windows: "("(1,2)","(3,4)")"
> > Linux: "("(1,)",)"
>
> You're passing a single isnull flag to heap_form_tuple calls that are
> expecting arrays of two flags ... and even the one value that's there
> according to the code isn't being initialized, so it's remarkable that
> this code works at all on any platform.
>
> regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-03-02 18:22:01 WAL segments pile up during standalone mode
Previous Message Nicolas Barbier 2011-03-02 17:48:25 Re: Native XML