From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Petr Jelínek <pjmodos(at)pjmodos(dot)net>, Greg Smith <greg(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Subject: | Re: review: CHECK FUNCTION statement |
Date: | 2012-02-28 19:30:58 |
Message-ID: | CAFj8pRADeq_YAE26ZtuPcDLAzfyruY03Sroi_kG5azRU1J9EQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
Dne 28. února 2012 17:48 Alvaro Herrera <alvherre(at)commandprompt(dot)com> napsal(a):
>
>
> I have a few comments about this patch:
>
> I didn't like the fact that the checker calling infrastructure uses
> SPI instead of just a FunctionCallN to call the checker function. I
> think this should be easily avoidable.
>
It is not possible - or it has not simple solution (I don't how to do
it). PLpgSQL_checker is SRF function. SPI is used for processing
returned resultset. I looked to pg source code, and I didn't find any
other pattern than using SPI for SRF function call. It is probably
possible, but it means some code duplication too. I invite any ideas.
> Second, I see that functioncmds.c gets a lot into trigger internals just
> to be able to figure out the function starting from a trigger name. I
> think it'd be saner to have a new function in trigger.c that returns the
> required function OID.
done
>
> I think CheckFunction would be clearer if the code to check multiple
> objects is split out into a separate subroutine.
done
>
> After CheckFunction there is a leftover function comment without any
> following function. There are other spurious hunks that add or remove
> single lines too (once in an otherwise untouched file).
fixed
>
I refreshed patch for current git repository.
Regards
Pavel
> --
> Álvaro Herrera <alvherre(at)commandprompt(dot)com>
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Attachment | Content-Type | Size |
---|---|---|
check_function-2012-02-28-2.diff.gz | application/x-gzip | 29.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2012-02-28 19:33:08 | Re: pgsql_fdw, FDW for PostgreSQL server |
Previous Message | Simon Riggs | 2012-02-28 19:21:41 | Re: CLOG contention, part 2 |