ODMG interface - Mailing list pgsql-hackers

From Chris Bitmead
Subject ODMG interface
Date
Msg-id 373404A6.1D4DED83@bigfoot.com
Whole thread Raw
In response to Re: [HACKERS] pg_dump problem?  (geek+@cmu.edu)
Responses Re: [HACKERS] ODMG interface  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I guess one thing I'm frustrated about is that I'm ready willing and
able to write an ODMG compliant interface, which is chiefly a client
side exercise, but I've been kind of hanging out looking for postgres to
get one or two backend features necessary to make that happen. Ok, I'm
going to try and figure out how to do it myself.

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;
relname                        
-------------------------------
person
employee
student
empstudent
person
student
(6 rows)

So the critical thing I need here is the imaginary field "classoid".
Postgres knows obviously which relation a particular object belongs to.
The question is how to turn this knowledge into an imaginary field that
can be queried.

Can anybody point me to which areas of the backend I need to be looking
to implement this? I see that there is a data structure called
"Relation" which has an oid field which is the thing I think I need to
be grabbing, but I'm not sure how to make this all come together. 

-- 
Chris Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris.bitmead@bigfoot.com


pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: Date/Time Flaw in pg_dump ?
Next
From: Rafael Kaufmann
Date:
Subject: Help a newbie?