OO future - Mailing list pgsql-hackers

From Karel Zak
Subject OO future
Date
Msg-id 20021030090844.C4001@zf.jcu.cz
Whole thread Raw
Responses Re: OO future
List pgsql-hackers
Hi, 
I read a presentation about Object-Oriented features in relation DBs.The nice are UDT (user defined type):
CREATE TABLE person (   name varchar(32),   address ROW( street varchar(32),                town   varchar(32)),   age
int);
INSERT INTO person VALUES ('Bill', ('Somestreet', 'Sometown'), 33);
SELECT name, address.town FROM person;

We have composite types in PostgreSQL and I think we can use it for this:
CREATE TYPE addr AS (street varchar(32), town varchar(32));CREATE TABLE person (   name varchar(32),   address addr,
ageint);
 
Comments? I nothinig found about OO in the current TODO. BTW, myexamples are only small part of possible OO features,
theothersideas are for example define PRIVATE/PUBLIC attributes in compositetypes and methods, "SELECT p.name FROM
personp WHERE p.pay->tax() > 100;"   Karel
 

-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz


pgsql-hackers by date:

Previous
From: Vladimir Chukharev
Date:
Subject: Re: Is regress/report.php in use?
Next
From: "Dave Page"
Date:
Subject: Re: pgAdmin III (Was: Request for supported platforms)