I'm a beginning developer to postgresql working on a CS Master's project trying to implement a new join operator. My question is how to effectively break down a TupleTableSlot into it's properties. I've been messing around with it for hours now 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 on where 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. ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match