Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Nick Rudnick <joerg(dot)rudnick(at)t-online(dot)de>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)
Date: 2011-02-01 15:11:16
Message-ID: 1296573076.16066.6.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On mån, 2011-01-31 at 21:53 -0500, Tom Lane wrote:
> You would probably have better luck shoehorning in such a feature if the
> syntax looked like this:
>
> (foo).bar(baz)
>
> foo being a value of some type that has methods, and bar being a method
> name.

The SQL standard has the <method invocation> clause that appears to
allow:

...something.column.method(args)

Good luck finding out how to interpret the dots, but it's specified
somewhere.

It'd be kind of nice as a syntax and namespacing alternative, actually,
but figuring out the compatibility problems would be a headache.

> Another possibility is
>
> foo->bar(baz)

This is in the SQL standard under <attribute or method reference>, but
it requires the left side to be of a reference type, which is something
that we don't have.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-01 15:14:49 Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)
Previous Message Euler Taveira de Oliveira 2011-02-01 15:02:52 Re: Named restore points