psql: Refine lexing of BEGIN...END blocks in CREATE FUNCTION statements

Peter Eisentraut <peter@eisentraut.org>

Commit: 029c5ac03db72f1898ee17e417650a2e0764b239
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2021-04-16T10:20:23Z
Releases: 14.0
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

Files

PathChange+/−
src/fe_utils/psqlscan.l modified +45 −8
src/include/fe_utils/psqlscan_int.h modified +7 −1

Discussion

Cited messages not in the archive: cee01d26fe55bc086b3bcf10bfe4e8d450e2f608.camel@cybertec.at