[HACKERS] heap_form_tuple crashing

2012-05-31 Thread Atri Sharma
Hi all, I am trying to call heap_form_tuple to create a tuple from a datum. 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

Re: [HACKERS] heap_form_tuple crashing

2012-05-31 Thread Heikki Linnakangas
On 31.05.2012 13:42, Atri Sharma wrote: I am trying to call heap_form_tuple to create a tuple from a datum. 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

Re: [HACKERS] heap_form_tuple crashing

2012-05-31 Thread Atri Sharma
On Thu, May 31, 2012 at 5:02 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 31.05.2012 13:42, Atri Sharma wrote: I am trying to call heap_form_tuple to create a tuple from a datum. My call to heap_form_tuple looks like: val1=0;

Re: [HACKERS] heap_form_tuple crashing

2012-05-31 Thread Heikki Linnakangas
On 31.05.2012 14:42, Atri Sharma wrote: Another thing I wanted to ask was that would you recommend building tuples from strings directly or converting them to Datum first and then build the tuples from Datum instances? It depends. If you have all the values in strings already, then

Re: [HACKERS] heap_form_tuple crashing

2012-05-31 Thread Atri Sharma
On Thu, May 31, 2012 at 5:14 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 31.05.2012 14:42, Atri Sharma wrote: Another thing I wanted to ask was that would you recommend building tuples from strings directly or converting them to Datum first and then build the tuples

Re: [HACKERS] heap_form_tuple crashing

2012-05-31 Thread Tom Lane
Atri Sharma atri.j...@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

Re: [HACKERS] heap_form_tuple crashing

2012-05-31 Thread Atri Sharma
On Thu, May 31, 2012 at 7:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@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