forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf2b7692
committed
Rearrange plpgsql parsing to simplify and speed it up a bit.
* Pull the responsibility for %TYPE and %ROWTYPE out of the scanner,letting read_datatype manage it instead.* Avoid unnecessary scanner-driven lookups of plpgsql variables inplaces where it's not needed, which is actually most of the time;we do not need it in DECLARE sections nor in text that is a SQLquery or expression.* Rationalize the set of token types returned by the scanner:distinguishing T_SCALAR, T_RECORD, T_ROW seems to complicate the grammarin more places than it simplifies it, so merge these into onetoken type T_DATUM; but split T_ERROR into T_DBLWORD and T_TRIPWORDfor clarity and simplicity of later processing.Some of this will need to be revisited again when we try to makeplpgsql use the core scanner, but this patch gets some of the biggerstumbling blocks out of the way.1 parentb79f49c commitf2b7692
File tree
5 files changed
+371
-372
lines changed- src/pl/plpgsql/src
5 files changed
+371
-372
lines changed0 commit comments
Comments
(0)