Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit39bd3fd

Browse files
committed
Modernize plpgsql's handling of parse locations, making it look a lot more
like the core parser's code. In particular, track locations at the characterrather than line level during parsing, allowing many more parse-time errorconditions to be reported with precise error pointers rather than just"near line N".Also, exploit the fact that we no longer need to substitute $N for variablereferences by making extracted SQL queries and expressions be exact copiesof subranges of the function text, rather than having random whitespacechanges within them. This makes it possible to directly map parse errorpositions from the core parser onto positions in the function text, whichlets us report them without the previous kluge of showing the intermediateinternal-query form. (Later it might be good to do that for coreparse-analysis errors too, but this patch is just touching plpgsql'slexer/parser, not what happens at runtime.)In passing, make plpgsql's lexer use palloc not malloc.These changes make plpgsql's parse-time error reports noticeably nicer(as illustrated by the regression test changes), and will also simplifythe planned removal of plpgsql's separate lexer by reducing the impedancemismatch between what it does and what the core lexer does.
1 parentfb60af4 commit39bd3fd

File tree

6 files changed

+771
-626
lines changed

6 files changed

+771
-626
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp