| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
|---|---|
| To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: event triggers with args? |
| Date: | 2015-02-25 14:45:15 |
| Message-ID: | alpine.DEB.2.10.1502251516420.10787@sto |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Andres,
>> So I have a question: is there a particular reason why arguments were not
>> provided in the first place?
>
> Yea. The existing trigger argument mechanims is extremely odd
> implementation wise - they don't have real datatypes and aren't passed
> via the normal parameter passing mechanism.
Indeed, I can only agree!
> IIRC we discussed this back when it was introduced and decided against
> introducing for now.
>
> I think the whole trigger argument infrastructure, even for normal
> triggers, should be rewritten. After that we could think of adding it
> for event triggers.
Ok. That sound reasonable. Thanks for the answer.
I think that the new method will have to be upward compatible. This
suggest providing TG_ARGV with casted to text arguments. Not necessarily a
big issue.
I've looked into the parser. ISTM that trigger call parameter list could
use a "expr_list", which would have to be evaluated and serialised in
pg_trigger, maybe as ROW does.
--
Fabien.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fabien COELHO | 2015-02-25 15:03:53 | Re: Add more tests on event triggers |
| Previous Message | Fabien COELHO | 2015-02-25 14:16:13 | Re: Add more tests on event triggers |