Skip site navigation (1) Skip section navigation (2)

Re: Should we drop the "object" from ORDBMS?

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-advocacy(at)postgresql(dot)org
Subject: Re: Should we drop the "object" from ORDBMS?
Date: 2012-04-26 06:34:23
Message-ID: CADxJZo3oKYr_WBFjtag8ytE2HwF2YpW9QG3xMqaf1fevp9+rsg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-advocacy
On 26 April 2012 16:02, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> As far as I can tell, postgresql has the following object-relational
> features:
>
...

> (3) Dot function call syntax: "select foo.count from foo" -- surprising
> to most people, and I don't recall ever seeing it suggested for actual
> use. I would go so far as to say we should deprecate this syntax,
> because I think it's more likely to be some kind of mistake than
> anything else.

Sometime in the distant past (can't find it now), I raised the idea of
having "methods" registered on a table.  If we are to pursue the
analogy of a table being like an object class, and a record being like
an object instance, well we've got the attributes covered, but we
don't have the methods.  My pipedream was that these methods could be
listed in \d and executed using dot call syntax.  So you could define
something like "FUNCTION age_years(person, date) RETURNS int" and then
call it like:

SELECT p.age_years(date '2012-05-01')
FROM person p

As I recall, my idea did not achieve escape velocity, but I still
think it would a) extend the dot-call syntax to a more useful pattern,
b) bolster our justification for the "O" in "ORDBMS", and c) actually
be kind of awesome.

On the broader question, I think you're right that our "O" is a little
bit tenuous.  But I take that as an incentive to make Postgres more
object-y, rather than an incentive to drop the "O".

Cheers,
BJ

In response to

Responses

pgsql-advocacy by date

Next:From: Chris TraversDate: 2012-04-26 07:00:33
Subject: Re: Should we drop the "object" from ORDBMS?
Previous:From: Jeff DavisDate: 2012-04-26 06:02:19
Subject: Should we drop the "object" from ORDBMS?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group