Ensure that PLPGSQL_DTYPE_ROW variables have valid refname fields.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 5 Oct 2018 16:45:37 +0000 (12:45 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 5 Oct 2018 16:45:37 +0000 (12:45 -0400)
commit113a659914daa8e8c9ced55ca82bfbd5bdcedbd4
tree8b13967f5cc27f0040661e926ab56b3024e5c3f3
parentb5f03dc7657e4cc62b975f3bc07b217916324a54
Ensure that PLPGSQL_DTYPE_ROW variables have valid refname fields.

Without this, the syntax-tree-dumping functions in pl_funcs.c crash,
and there are other places that might be at risk too.  Per report
from Pavel Stehule.

Looks like I broke this in commit f9263006d, so back-patch to v11.

Discussion: https://postgr.es/m/CAFj8pRA+3f5n4642q2g8BXCKjbTd7yU9JMYAgDyHgozk6cQ-VA@mail.gmail.com
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_gram.y
src/pl/plpgsql/src/plpgsql.h