Re: Methods in pgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Efrain Caro" <betsemes(at)hotmail(dot)com>
Cc: "PostgreSQL general mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Methods in pgsql
Date: 2000-09-29 21:14:32
Message-ID: 2028.970262072@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Efrain Caro" <betsemes(at)hotmail(dot)com> writes:
> I've read somewhere that PostgreSQL is an ordbms or a oodbms. After reading
> Bruce Momjian's book "PostgreSQL: Introduction and Concepts" it's apparent
> to me that the only feature that seems to be an object oriented one is table
> inheritance. I didn't see a method implementation anywhere in the
> book.

You could get some of that effect with triggers associated with
particular child tables. SQL92 doesn't really have any notion of
computation associated with a table, as opposed to computation
associated with rows being put into or taken out of a table,
so there's not a lot of scope for true methods associated with a
table viewed as an object. But you could use triggers to vary
what happens when you store or update rows in different tables.

Note also that there's a pretty complete abstract-data-type facility
for the data values being kept in tables. If the objects you want
to deal with are more along the lines of items in tables instead of
tables themselves, there's plenty of room to define a collection of
datatypes that have method-ish behavior. I'm not sure you could claim
that Postgres "supports" that, since it doesn't offer a handy notation
or anything, but it doesn't get in the way either.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2000-09-29 22:02:43 RE: sql/trigger question...arguments?
Previous Message chris markiewicz 2000-09-29 21:04:17 RE: sql/trigger question...arguments?