From b6d3ccf2f5f1a179e25e277bae3f432cc084ce58 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 16 Jul 2026 11:47:41 +0200 Subject: [PATCH] Make PL/Tcl require Tcl 8.6 or later Support for Tcl 8.5 and 8.4 is removed. Since we no longer support RHEL 7, we don't need to support these old versions anymore. This allows some small amount of code cleanup. Reviewed-by: Jelte Fennema-Nio Discussion: https://www.postgresql.org/message-id/flat/CA+hUKGL7trhWiJ4qxpksBztMMTWDyPnP1QN+Lq341V7QL775DA@mail.gmail.com --- config/tcl.m4 | 2 +- configure | 2 +- doc/src/sgml/installation.sgml | 5 ++--- src/pl/tcl/pltcl.c | 15 +++++---------- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/config/tcl.m4 b/config/tcl.m4 index 9de31a57156..d226ef99d05 100644 --- a/config/tcl.m4 +++ b/config/tcl.m4 @@ -4,7 +4,7 @@ AC_DEFUN([PGAC_PATH_TCLSH], -[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84]) +[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86]) AC_ARG_VAR(TCLSH, [Tcl interpreter program (tclsh)])dnl if test x"$TCLSH" = x""; then AC_MSG_ERROR([Tcl shell not found]) diff --git a/configure b/configure index 5fc85a24519..83609ac988c 100755 --- a/configure +++ b/configure @@ -19003,7 +19003,7 @@ fi # Check for Tcl configuration script tclConfig.sh if test "$with_tcl" = yes; then if test -z "$TCLSH"; then - for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 + for ac_prog in tclsh tcl tclsh8.6 tclsh86 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 37a0473d03e..8b98938d2a1 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -265,7 +265,7 @@ To build the PL/Tcl procedural language, you of course need a Tcl installation. The minimum required version is - Tcl 8.4. + Tcl 8.6. @@ -1936,8 +1936,7 @@ build-postgresql: Tcl interpreter program. This will be used to determine the dependencies for building PL/Tcl. If this is not set, the following are probed in this - order: tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 - tclsh8.4 tclsh84. + order: tclsh tcl tclsh8.6 tclsh86. diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 85e83bbf1e3..c8a9363aaa1 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -50,14 +50,9 @@ PG_MODULE_MAGIC_EXT( ((TCL_MAJOR_VERSION > maj) || \ (TCL_MAJOR_VERSION == maj && TCL_MINOR_VERSION >= min)) -/* Insist on Tcl >= 8.4 */ -#if !HAVE_TCL_VERSION(8,4) -#error PostgreSQL only supports Tcl 8.4 or later. -#endif - -/* Hack to deal with Tcl 8.6 const-ification without losing compatibility */ -#ifndef CONST86 -#define CONST86 +/* Insist on Tcl >= 8.6 */ +#if !HAVE_TCL_VERSION(8,6) +#error PostgreSQL only supports Tcl 8.6 or later. #endif #if !HAVE_TCL_VERSION(8,7) @@ -366,7 +361,7 @@ pltcl_FinalizeNotifier(ClientData clientData) } static void -pltcl_SetTimer(CONST86 Tcl_Time *timePtr) +pltcl_SetTimer(const Tcl_Time *timePtr) { } @@ -392,7 +387,7 @@ pltcl_ServiceModeHook(int mode) } static int -pltcl_WaitForEvent(CONST86 Tcl_Time *timePtr) +pltcl_WaitForEvent(const Tcl_Time *timePtr) { return 0; }