Re: heap_form_tuple crashing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: heap_form_tuple crashing
Date: 2012-05-31 13:31:18
Message-ID: 8372.1338471078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Atri Sharma <atri(dot)jiit(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Klemme 2012-05-31 13:38:35 Re: pg_dump and thousands of schemas
Previous Message Peter Geoghegan 2012-05-31 12:38:45 Re: Uh, I change my mind about commit_delay + commit_siblings (sort of)