Fix bug in handling of dropped columns in pltcl triggers

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Karl Lehenbauer <karl(at)flightaware(dot)com>
Subject: Fix bug in handling of dropped columns in pltcl triggers
Date: 2016-10-31 19:17:37
Message-ID: b2de8258-c4c0-1cb8-7b97-e8538e5c975c@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While reviewing code coverage in pltcl, I uncovered a bug in trigger
function return handling. If you returned the munged name of a dropped
column, that would silently be ignored. It would be unusual to hit this,
since dropped columns end up with names like
".......pg.dropped.2.......", but since that's still a legitimate name
for a column silently ignoring it seems rather bogus.

Work sponsored by FlightAware.

https://github.com/postgres/postgres/compare/master...decibel:tcl_dropped
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

Attachment Content-Type Size
pltcl_trigger_return.patch text/plain 5.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-10-31 19:43:56 Re: Speed up Clog Access by increasing CLOG buffers
Previous Message Peter Geoghegan 2016-10-31 19:12:34 Re: Unsafe use of relation->rd_options without checking its type