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)
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.