tuple properties out of TupleTableSlot - Mailing list pgsql-hackers

From Schoudel, Brian
Subject tuple properties out of TupleTableSlot
Date
Msg-id AF1BE4D7F414834EAA1E9672B79484BB01AE00@adminmail3.ui.uillinois.edu
Whole thread Raw
Responses Re: tuple properties out of TupleTableSlot
List pgsql-hackers
I'm a beginning developer to postgresql working on a CS Master's project trying to implement a new join operator.  My
questionis how to effectively break down a TupleTableSlot into it's properties.  I've been messing around with it for
hoursnow and thought the code below would return the attribute name for table but instead just returns some binary
info.

For example, If I have table

TABLE1 with columns (ID, SCORE), I was thinking that the below code would return ID and SCORE as they are the column
names. I also need to be able to retrieve the data stored in these columns (select id, score from table1;).  Any tips
onwhere to look or find the information I'm looking for would be much appreciated. 
TupleTableSlot *slot;
TupleDesc       tuple_type;

tuple_type = slot->ttc_tupleDescriptor;
for (i = 0; i < tuple_type->natts; i++)       {           printf("The attname name is
%c",tuple_type->attrs[i]->attname.data);
       }


Thank You.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: somebody working on: Prevent default re-use of sysids for dropped users and groups?
Next
From: Noèl Köthe
Date:
Subject: port report: Linux parisc64 / hppa