From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch for 8.5, transformationHook |
Date: | 2009-04-11 17:21:41 |
Message-ID: | 162867790904111021r5f13c69ese4b14156d8d5312d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/4/11 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2009/4/11 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>>>> I am sending small patch, that allows hooking transformation stage of parser.
>>>
>>> Isn't this the exact same patch we rejected several months ago?
>
>> What I remember, You had some objections about different behave before
>> and after loading an library.
>
> No, I was complaining that a hook right there is useless and expensive.
> transformExpr() is executed multiple times per query, potentially a very
> large number of times per query; so even testing to see if a hook exists
> is not a negligible cost. And I have not seen anything I regard as a
> convincing demonstration of use-case that can't be handled as well or
> better in some other way.
>
I will do some performance testing. But effect of empty hook should be
similar to testing some GUC now. But I have to do some metering.
Actually transformExpr contains relative big case now, and empty hook
has similar performance effect as new parser node.
I sent some examples, that helps to people with database migration
(some are obscure, I know - Oracle empty string support - it's +/-
joke, there are more serious samples ). And I am preparing JSON
support as example of some comfortable libraries. Next use case should
be in enhancing of db-link functions.
http://archives.postgresql.org/pgsql-hackers/2009-03/msg01239.php
regards
Pavel Stehule
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2009-04-11 17:29:15 | Re: Allow COMMENT ON to accept an expression rather than just a string |
Previous Message | Bruce Momjian | 2009-04-11 17:15:50 | Re: Allow COMMENT ON to accept an expression rather than just a string |