From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | "-ha >> PostgreSQL-development" <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | CreateEventTrigStmt copy fix |
Date: | 2014-09-19 16:09:16 |
Message-ID: | 541C552C.7070506@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
I was trying to create event trigger inside DO statement inside an
extension SQL script and noticed that the new event trigger has empty
evtevent field.
After some tinkering with gdb I found out that the memory context
switches sometimes clear the eventname in CreateEventTrigStmt struct.
The reason for this is that _copyCreateEventTrigStmt uses
COPY_SCALAR_FIELD on eventname instead of COPY_STRING_FIELD.
Attached patch fixes this and also the same issue in
_equalCreateEventTrigStmt.
This should be back-patched to 9.3 where event triggers were introduced.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
cevttrigger-copyfix.patch | text/x-diff | 957 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2014-09-19 16:29:29 | Re: RLS Design |
Previous Message | Andres Freund | 2014-09-19 16:03:45 | Re: RLS Design |