On Wed, Oct 29, 2008 at 09:40:00AM -0700, David Fetter wrote:
> Please find enclosed a WIP patch to add the ability for functions to
> see the qualifiers of the query in which they're called. It's not
> working just yet, and I'm not sure how best to get it working, but I'd
> like to see this as part of 8.4, as SQL/MED is just way too ambitious
> given the time frame.
> Any tips, hints, pointers, etc. would be much appreciated.
> Also, PL/Perl shouldn't be the only language to have this capability.
> How might we add similar capabilities to PL/PythonU and PL/Tcl? To
> the rest of the PLs? Would it make any sense to have it in SQL
> language functions?
Please find attached a patch which works in PL/Perl, the work having
been done by Andrew (RhodiumToad) Gierth. It's not clear to me how
this would be generally surface-able to SQL, though. Any ideas?
CREATE OR REPLACE FUNCTION show_qual()
postgres=# SELECT * FROM show_qual() s(a) where a like '%';
(a ~~ '%'::text)
However, there are little lacunæ like this:
SELECT * FROM show_qual() s(a)
WHERE A NOT IN (
SELECT 'foo' UNION ALL SELECT 'bar'
(NOT (hashed subplan))
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
In response to
- pre-MED at 2008-10-29 16:40:00 from David Fetter
pgsql-hackers by date
|Next:||From: Nikhil Sontakke||Date: 2008-10-31 14:50:46|
|Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1|
|Previous:||From: Tom Lane||Date: 2008-10-31 14:21:59|
|Subject: Re: PG_PAGE_LAYOUT_VERSION 5 - time for change |