From: | Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | OO future |
Date: | 2002-10-30 08:08:45 |
Message-ID: | 20021030090844.C4001@zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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,
age int
);
Comments? I nothinig found about OO in the current TODO. BTW, my
examples are only small part of possible OO features, the others
ideas are for example define PRIVATE/PUBLIC attributes in composite
types and methods, "SELECT p.name FROM person p WHERE p.pay->tax() > 100;"
Karel
--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2002-10-30 08:19:11 | Re: pgAdmin III (Was: Request for supported platforms) |
Previous Message | Vladimir Chukharev | 2002-10-30 06:50:12 | Re: Is regress/report.php in use? |