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

From Tom Lane
Subject Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)
Date
Msg-id 14611.1296528781@sss.pgh.pa.us
Whole thread Raw
In response to Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)  (Robert Haas <robertmhaas@gmail.com>)
Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> It would help if you were a bit more specific.  Do you mean you want
> to write something like foo.bar(baz) and have that mean call the bar
> method of foo and pass it baz as an argument?

> If so, that'd certainly be possible to implement for purposes of a
> college course, if you're so inclined - after all it's free software -
> but we'd probably not make such a change to core PG, because right now
> that would mean call the function bar in schema baz and pass it foo as
> an argument.  We try not to break people's code to when adding
> nonstandard features.

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.  Another possibility is
foo->bar(baz)

I agree with Robert's opinion that it'd be unlikely the project would
accept such a patch into core, but if you're mainly interested in it
for research purposes that needn't deter you.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: wildcard search support for pg_trgm
Next
From: Fujii Masao
Date:
Subject: Re: Allowing multiple concurrent base backups