Re: heap_form_tuple crashing - Mailing list pgsql-hackers

From Atri Sharma
Subject Re: heap_form_tuple crashing
Date
Msg-id CAOeZVifWVbB9YRK+ELXYwxLDuN8Ft2VB7=ADOxwQNu_phkhweA@mail.gmail.com
Whole thread Raw
In response to Re: heap_form_tuple crashing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, May 31, 2012 at 7:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Atri Sharma <atri.jiit@gmail.com> writes:
>> My call to heap_form_tuple looks like:
>> val1=0;
>> tupledesc1=BlessTupleDesc(node->ss.ss_currentRelation->rd_att);
>> tuple=heap_form_tuple(tupledesc1,p1,&val1);
>
>> p1 is a pointer to a Datum instance which is created from a char array.
>
> Does that actually match the tupdesc you're using?  Are you sure you
> created the Datum correctly (ie, did you call the appropriate datatype
> input routine)?
>
> BTW, the BlessTupleDesc call here seems to be pure cargo-cult
> programming.  It should not be necessary to bless a relation's tupdesc
> (because that should be a named type already); and even if it were,
> heap_form_tuple doesn't care.
>
>                        regards, tom lane

Hi Tom,

Thanks for the advice and help.Your diagnosis is correct,I used the
correct datatype input routine and it worked like a charm.

I will remove the calls to BlessTupleDesc then?

Atri

--
Regards,

Atri
l'apprenant


pgsql-hackers by date:

Previous
From: chinnaobi
Date:
Subject: Re: hot standby PSQL 9.1 Windows 2008 Servers
Next
From: Merlin Moncure
Date:
Subject: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile