tuple properties out of TupleTableSlot

From: "Schoudel, Brian" <BrianS(at)uillinois(dot)edu>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: tuple properties out of TupleTableSlot
Date: 2004-12-08 14:48:34
Message-ID: AF1BE4D7F414834EAA1E9672B79484BB01AE00@adminmail3.ui.uillinois.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sibtay Abbas 2004-12-08 16:03:22 old-style handler problem
Previous Message Sibtay Abbas 2004-12-08 11:48:18 old-style handler error