Skip to content

Commit

Permalink
Add patch for trailing junk on param references
Browse files Browse the repository at this point in the history
  • Loading branch information
msepga committed Dec 13, 2023
1 parent 8780869 commit bd15fd5
Show file tree
Hide file tree
Showing 3 changed files with 2,844 additions and 2,939 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ $(PGDIR):
cd $(PGDIR); patch -p1 < $(root_dir)/patches/06_alloc_set_delete_free_list.patch
cd $(PGDIR); patch -p1 < $(root_dir)/patches/07_plpgsql_start_finish_datums.patch
cd $(PGDIR); patch -p1 < $(root_dir)/patches/08_avoid_zero_length_delimiter_in_regression_tests.patch
cd $(PGDIR); patch -p1 < $(root_dir)/patches/09_allow_param_junk.patch
cd $(PGDIR); ./configure $(PG_CONFIGURE_FLAGS)
cd $(PGDIR); rm src/pl/plpgsql/src/pl_gram.h
cd $(PGDIR); make -C src/pl/plpgsql/src pl_gram.h
Expand Down
24 changes: 24 additions & 0 deletions patches/09_allow_param_junk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index 154defc6b8..26a54e1505 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -420,7 +420,6 @@ numeric_junk {numeric}{ident_start}
real_junk {real}{ident_start}

-param \${decinteger}
+param \${decdigit}+
-param_junk \${decinteger}{ident_start}

other .

@@ -1013,10 +1012,6 @@ other .
yylval->ival = atol(yytext + 1);
return PARAM;
}
-{param_junk} {
- SET_YYLLOC();
- yyerror("trailing junk after parameter");
- }

{decinteger} {
SET_YYLLOC();
Loading

0 comments on commit bd15fd5

Please sign in to comment.