Skip to content

Commit

Permalink
Allow alternate definitions of NAMEDATALEN identifier limit
Browse files Browse the repository at this point in the history
  • Loading branch information
david-h-muller committed Oct 22, 2024
1 parent 0667029 commit 1e9f2ca
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ $(PGDIR):
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); patch -p1 < $(root_dir)/patches/10_ifndef_namedatalen.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
14 changes: 14 additions & 0 deletions patches/10_ifndef_namedatalen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index a1a93ad..c978d76 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -26,7 +26,9 @@
*
* Changing this requires an initdb.
*/
+#ifndef NAMEDATALEN
#define NAMEDATALEN 64
+#endif

/*
* Maximum number of arguments to a function.
2 changes: 2 additions & 0 deletions src/postgres/include/pg_config_manual.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
*
* Changing this requires an initdb.
*/
#ifndef NAMEDATALEN
#define NAMEDATALEN 64
#endif

/*
* Maximum number of arguments to a function.
Expand Down

0 comments on commit 1e9f2ca

Please sign in to comment.