psql: Refine lexing of BEGIN...END blocks in CREATE FUNCTION statements
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 16 Apr 2021 09:46:01 +0000 (11:46 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 16 Apr 2021 10:20:23 +0000 (12:20 +0200)
commit029c5ac03db72f1898ee17e417650a2e0764b239
tree7bd3241f78afd3966cb1cb85150f99d73d009a61
parent25593d7d338232fb855ba563b325237de8f14091
psql: Refine lexing of BEGIN...END blocks in CREATE FUNCTION statements

Only track BEGIN...END blocks if they are in a CREATE [OR REPLACE]
{FUNCTION|PROCEDURE} statement.  Ignore if in parentheses.

Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Discussion: https://www.postgresql.org/message-id/cee01d26fe55bc086b3bcf10bfe4e8d450e2f608.camel@cybertec.at
src/fe_utils/psqlscan.l
src/include/fe_utils/psqlscan_int.h