Thread: Methods in pgsql

Methods in pgsql

From
"Efrain Caro"
Date:
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. Did
Momjian omitted the topic or it is indeed nonexistent in the current
version?

Efrain

Attachment

Re: Methods in pgsql

From
Peter Eisentraut
Date:
Efrain Caro 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. Did
> Momjian omitted the topic or it is indeed nonexistent in the current
> version?

Methods don't exist.  In general, a complete SQL implementation is the
priority of the project; OO features tend to have been neglected a bit.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Methods in pgsql

From
"Efrain Caro"
Date:
Then, may I conclude that methods are not part of the SQL92 standard?

----- Original Message -----
From: "Peter Eisentraut" <peter_e@gmx.net>
To: "Efrain Caro" <betsemes@hotmail.com>
Cc: "PostgreSQL general mailing list" <pgsql-general@postgresql.org>
Sent: Friday, September 29, 2000 4:06 PM
Subject: Re: [GENERAL] Methods in pgsql


> Efrain Caro 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.
Did
> > Momjian omitted the topic or it is indeed nonexistent in the current
> > version?
>
> Methods don't exist.  In general, a complete SQL implementation is the
> priority of the project; OO features tend to have been neglected a bit.
>
> --
> Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/
>
>

Re: Methods in pgsql

From
Tom Lane
Date:
"Efrain Caro" <betsemes@hotmail.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

Re: Methods in pgsql

From
Peter Eisentraut
Date:
Efrain Caro writes:

> Then, may I conclude that methods are not part of the SQL92 standard?

They aren't, but the current standard is SQL99, which has this sort of
thing.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Methods in pgsql

From
"Efrain Caro"
Date:
Is there an online source through which I can get the SQL99 standard
specification?

----- Original Message -----
From: "Peter Eisentraut" <peter_e@gmx.net>
To: "Efrain Caro" <betsemes@hotmail.com>
Cc: "PostgreSQL general mailing list" <pgsql-general@postgresql.org>
Sent: Friday, September 29, 2000 7:48 PM
Subject: Re: [GENERAL] Methods in pgsql


> Efrain Caro writes:
>
> > Then, may I conclude that methods are not part of the SQL92 standard?
>
> They aren't, but the current standard is SQL99, which has this sort of
> thing.
>
> --
> Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/
>
>