Re: [HACKERS] ODMG interface - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] ODMG interface
Date
Msg-id 19031.926177198@sss.pgh.pa.us
Whole thread Raw
In response to ODMG interface  (Chris Bitmead <chris.bitmead@bigfoot.com>)
List pgsql-hackers
Chris Bitmead <chris.bitmead@bigfoot.com> writes:
> Q1. I need to have a virtual field which describes the class membership. 

> So I want to be able to find the class name of various objects by doing
> something like
> SELECT relname FROM person*, pg_class where person.classoid =
> pg_class.oid;

I am not sure what you mean by "class membership" here.  There is type
information for each column of every relation in pg_attribute and
pg_type.  There is also a pg_type entry for each relation, which can be
thought of as the type of the rows of the relation.  The query you show
above looks like maybe what you really want to get at is the inheritance
hierarchy between relations --- if so see pg_inherits.

I suspect that whatever you are looking for is already available in the
system tables, but I'm not quite certain about what semantics you want.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Help a newbie?
Next
From: Chris Bitmead
Date:
Subject: Re: [HACKERS] ODMG interface