Re: tuple descriptors?

From: "Nate Sommer" <sommena(at)earlham(dot)edu>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tuple descriptors?
Date: 2002-12-10 04:54:15
Message-ID: 009901c2a008$30793eb0$8fa01c9f@hairshorts
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2002-12-10 04:55:38 Re: psql's \d commands --- end of the line for
Previous Message Dan Langille 2002-12-10 04:51:07 Re: Let's create a release team