Re: tuple descriptors? - Mailing list pgsql-hackers

From Nate Sommer
Subject Re: tuple descriptors?
Date
Msg-id 009901c2a008$30793eb0$8fa01c9f@hairshorts
Whole thread Raw
In response to tuple descriptors?  ("Nate Sommer" <sommena@earlham.edu>)
Responses Re: tuple descriptors?
List pgsql-hackers
> > Can anyone tell me how to get a tuple's TupleDesc if all that is known
is t=
> > he tid?  Or is there an easy way to step through a tuple, retrieving the
da=
> > ta and data type from each field?
>
> Tupledescs are generally associated with tables (relations) more easily
> than with specific tuples.  What exactly is your context here?
>
> regards, tom lane

I'm a student taking a database systems course, and as a project option I
chose to work on one of PostgreSQL's todo list items, namely "auto-delete
large objects when referencing row is deleted."  The main point of the
project is to become more comfortable tackling large amounts of code.
Working through the PostgreSQL code has been very interesting, and thus far
I've worked independently, but now I'm getting a little overwhelmed.  What
I'd like to do is add some code to the heap_delete function that checks the
tuple being deleted for oids, compares those oids to the loids in the
pg_largeobject relation, and deletes rows accordingly.  I thought using
TupleDescs would be helpful, but I guess my understanding of them is off.

Nate Sommer



pgsql-hackers by date:

Previous
From: "Dan Langille"
Date:
Subject: Re: Let's create a release team
Next
From: Alvaro Herrera
Date:
Subject: Re: psql's \d commands --- end of the line for