Re: RFD: schemas and different kinds of Postgres objects

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bill Studenmund <wrstuden(at)netbsd(dot)org>, <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: RFD: schemas and different kinds of Postgres objects
Date: 2002-01-25 05:27:07
Message-ID: Pine.LNX.4.30.0201250013040.686-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> There could be multiple valid interpretations. When you can't even
> figure out where to start, it's too squishy for me. Code complexity
> isn't really the issue here, it's whether a user can understand what's
> going on.

Here's a tricky question: In what situations is a.b valid to mean b(a)?
Because in a general object-like system you could write a.b.c.d to mean
d(c(b(a))). There you've got a system where it's really impossible to
tell anything. Maybe b() returns a table, so a.b.c.d could mean
subattribute d in column c in the table returned by b(a).

Somehow we need to do at least one of three things:
1. Require parentheses after function calls.
2. Use a different operator to invoke function calls (SQL uses ->).
3. Require users to register functions as "methods" with the data type
before being able to say a.b for b(a). This also takes care of having to
specify the schema of b because that's declared when you define the
method.

SQL99 does 2 and 3 (but not 1).

I say, forget Oracle. Oracle doesn't have all the extensibility
functionality that PostgreSQL has. Let's build a system that is
consistent, orthogonal, and easy to use for *our* users, and those that
want to convert will quickly see the value.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lau NH 2002-01-25 05:39:14 Database access right
Previous Message Tom Lane 2002-01-25 04:42:56 Re: Backend shutdown time?