Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion configure
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure is usually generated by autoconf tool. Unsure if autoconf tool needs to be run each time the configure.ac is changed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it‘s reasonable to be concerned about that after autoconf executed, the configure file will be covered.
fix it now.

Original file line number Diff line number Diff line change
Expand Up @@ -19644,9 +19644,15 @@ else
cc_string=$CC
fi

# IvorySQL version
PACKAGE_IVORYSQL_VERSION='5.0'

cat >>confdefs.h <<_ACEOF
#define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
#define PACKAGE_IVORYSQL_VERSION "$PACKAGE_IVORYSQL_VERSION"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PG_VERSION_STR "PostgreSQL $PG_VERSION (IvorySQL $PACKAGE_IVORYSQL_VERSION) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
_ACEOF


Expand Down
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,23 @@ Untested combinations of 'autoconf' and PostgreSQL versions are not
recommended. You can remove the check from 'configure.ac' but it is then
your responsibility whether the result works or not.])])
AC_COPYRIGHT([Copyright (c) 1996-2025, PostgreSQL Global Development Group])
AC_COPYRIGHT([Portions Copyright (c), 2023-2025, IvorySQL Global Development Team])
AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
AC_CONFIG_AUX_DIR(config)
AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure])

# IvorySQL version
PACKAGE_IVORYSQL_VERSION='5.0'

[PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`]
[PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`]
test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
AC_SUBST(PG_MAJORVERSION)
AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major version as a string])
AC_DEFINE_UNQUOTED(PG_MAJORVERSION_NUM, $PG_MAJORVERSION, [PostgreSQL major version number])
AC_DEFINE_UNQUOTED(PG_MINORVERSION_NUM, $PG_MINORVERSION, [PostgreSQL minor version number])
AC_DEFINE_UNQUOTED([PACKAGE_IVORYSQL_VERSION], "$PACKAGE_IVORYSQL_VERSION" , [IvorySQL version number])

PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
[PG_VERSION="$PACKAGE_VERSION$withval"],
Expand Down Expand Up @@ -2553,7 +2558,7 @@ else
fi

AC_DEFINE_UNQUOTED(PG_VERSION_STR,
["PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
["PostgreSQL $PG_VERSION (IvorySQL $PACKAGE_IVORYSQL_VERSION) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
Comment on lines +2561 to 2562
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Define PACKAGE_IVORYSQL_VERSION in Autoconf header to match Meson.

To ensure src/include/pg_config.h defines PACKAGE_IVORYSQL_VERSION (not just leaves it #undef), add an option and define:

@@
 AC_DEFINE_UNQUOTED(PG_VERSION, "$PG_VERSION", [PostgreSQL version as a string])
 
+dnl IvorySQL version string (configurable; default 5.0)
+AC_ARG_WITH([ivorysql-version],
+  [AS_HELP_STRING([--with-ivorysql-version=VER], [set IvorySQL version string [5.0]])],
+  [PACKAGE_IVORYSQL_VERSION="$withval"],
+  [PACKAGE_IVORYSQL_VERSION="5.0"])
+AC_DEFINE_UNQUOTED([PACKAGE_IVORYSQL_VERSION], ["$PACKAGE_IVORYSQL_VERSION"], [IvorySQL version as a string])
+AC_SUBST([PACKAGE_IVORYSQL_VERSION])
+
@@
 AC_DEFINE_UNQUOTED(PG_VERSION_STR,
-                  ["PostgreSQL $PG_VERSION (IvorySQL $PACKAGE_IVORYSQL_VERSION) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
+                  ["PostgreSQL $PG_VERSION (IvorySQL $PACKAGE_IVORYSQL_VERSION) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
                   [A string containing the version number, platform, and C compiler])

This keeps both build systems in lockstep and lets packagers override the IvorySQL version via configure.



---

🏁 Script executed:

```shell
#!/bin/bash
# Find and inspect configure.ac around the mentioned lines and search for PACKAGE_IVORYSQL_VERSION usage
fd -t f "configure\.ac" -x cat {} | head -2600 | tail -100

Length of output: 4117


🏁 Script executed:

#!/bin/bash
# Search for all occurrences of PACKAGE_IVORYSQL_VERSION in configure.ac
rg -n "PACKAGE_IVORYSQL_VERSION" --type autoconf -C 5

Length of output: 32


🏁 Script executed:

#!/bin/bash
# Check if pg_config.h.in exists and contains PACKAGE_IVORYSQL_VERSION
fd -t f "pg_config\.h\.in" -x rg -n "PACKAGE_IVORYSQL_VERSION" {} -C 3

Length of output: 209


🏁 Script executed:

#!/bin/bash
# Search for AC_DEFINE_UNQUOTED calls to understand current pattern
rg -n "AC_DEFINE_UNQUOTED.*VERSION" --type autoconf -C 2

Length of output: 32


🏁 Script executed:

#!/bin/bash
# Check for Meson build configuration related to IvorySQL version
fd -t f "meson.build" -x rg -n "IVORYSQL\|ivorysql" {} -C 3

Length of output: 0



---

🏁 Script executed:

```shell
#!/bin/bash
# Search configure.ac for PACKAGE_IVORYSQL_VERSION without type restriction
rg "PACKAGE_IVORYSQL_VERSION" -C 5 -- configure.ac

Length of output: 500


🏁 Script executed:

#!/bin/bash
# Search for AC_DEFINE_UNQUOTED with VERSION in configure.ac
rg "AC_DEFINE_UNQUOTED.*VERSION" -C 3 -- configure.ac

Length of output: 1354


🏁 Script executed:

#!/bin/bash
# Look for where PACKAGE_IVORYSQL_VERSION might be initially set/assigned
rg "PACKAGE_IVORYSQL_VERSION\s*=" -C 3 -- configure.ac

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Search all meson files for IvorySQL version handling
find . -name "meson.build" -o -name "meson_options.txt" 2>/dev/null | head -20

Length of output: 638


🏁 Script executed:

#!/bin/bash
# Check if PACKAGE_IVORYSQL_VERSION appears in any AC_SUBST or AC_ARG_WITH
rg "AC_ARG_WITH|AC_SUBST.*IVORYSQL" -C 3 -- configure.ac

Length of output: 0



---

🏁 Script executed:

```shell
#!/bin/bash
# Check root meson.build for IVORYSQL version handling
rg "IVORYSQL|ivorysql|VERSION" ./meson.build -C 3 2>/dev/null | head -50

Length of output: 1553


🏁 Script executed:

#!/bin/bash
# Check config/meson.build for version definitions
rg "IVORYSQL|ivorysql|PACKAGE_VERSION" ./config/meson.build -C 3 2>/dev/null | head -50

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Look for version defines or conf settings in meson files
rg "conf\.set.*IVORYSQL|conf\.set.*VERSION" . -g "meson.build" -C 3 | head -50

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check if there's any VERSION variable or option defined in Meson
fd -t f "meson.build" -x grep -l "version\|VERSION" {} \; | head -5

Length of output: 160


Add AC_DEFINE_UNQUOTED and AC_ARG_WITH for PACKAGE_IVORYSQL_VERSION in configure.ac to match Meson.

Verification confirms Meson (./meson.build) correctly defines ivorysql_version = '5.0' and sets cdata.set_quoted('PACKAGE_IVORYSQL_VERSION', ivorysql_version), but Autoconf never defines this variable. Currently, configure.ac references $PACKAGE_IVORYSQL_VERSION in AC_DEFINE_UNQUOTED(PG_VERSION_STR, ...) without defining it, causing pg_config.h to leave PACKAGE_IVORYSQL_VERSION undefined (#undef). The suggested patch aligns the Autoconf build with Meson and enables packagers to customize the IvorySQL version via --with-ivorysql-version.

@@
 AC_DEFINE_UNQUOTED(PG_VERSION, "$PG_VERSION", [PostgreSQL version as a string])
 
+dnl IvorySQL version string (configurable; default 5.0)
+AC_ARG_WITH([ivorysql-version],
+  [AS_HELP_STRING([--with-ivorysql-version=VER], [set IvorySQL version string [5.0]])],
+  [PACKAGE_IVORYSQL_VERSION="$withval"],
+  [PACKAGE_IVORYSQL_VERSION="5.0"])
+AC_DEFINE_UNQUOTED([PACKAGE_IVORYSQL_VERSION], ["$PACKAGE_IVORYSQL_VERSION"], [IvorySQL version as a string])
+AC_SUBST([PACKAGE_IVORYSQL_VERSION])
+
@@
 AC_DEFINE_UNQUOTED(PG_VERSION_STR,
                    ["PostgreSQL $PG_VERSION (IvorySQL $PACKAGE_IVORYSQL_VERSION) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
                    [A string containing the version number, platform, and C compiler])
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
["PostgreSQL $PG_VERSION (IvorySQL $PACKAGE_IVORYSQL_VERSION) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
dnl IvorySQL version string (configurable; default 5.0)
AC_ARG_WITH([ivorysql-version],
[AS_HELP_STRING([--with-ivorysql-version=VER], [set IvorySQL version string [5.0]])],
[PACKAGE_IVORYSQL_VERSION="$withval"],
[PACKAGE_IVORYSQL_VERSION="5.0"])
AC_DEFINE_UNQUOTED([PACKAGE_IVORYSQL_VERSION], ["$PACKAGE_IVORYSQL_VERSION"], [IvorySQL version as a string])
AC_SUBST([PACKAGE_IVORYSQL_VERSION])
AC_DEFINE_UNQUOTED(PG_VERSION_STR,
["PostgreSQL $PG_VERSION (IvorySQL $PACKAGE_IVORYSQL_VERSION) on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
🤖 Prompt for AI Agents
In configure.ac around lines 2556-2557, configure.ac references
$PACKAGE_IVORYSQL_VERSION in AC_DEFINE_UNQUOTED(PG_VERSION_STR, ...) but never
defines it; add an AC_ARG_WITH that accepts --with-ivorysql-version (setting
PACKAGE_IVORYSQL_VERSION to the provided value, defaulting to the Meson value
such as "5.0" if none given) and then call
AC_DEFINE_UNQUOTED(PACKAGE_IVORYSQL_VERSION, "$PACKAGE_IVORYSQL_VERSION",
[IvorySQL version string]) before the PG_VERSION_STR/AC_DEFINE_UNQUOTED usage so
pg_config.h gets a defined PACKAGE_IVORYSQL_VERSION and packagers can override
via --with-ivorysql-version.


# Supply a numeric version string for use by 3rd party add-ons
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ cdata.set('PG_MAJORVERSION_NUM', pg_version_major)
cdata.set('PG_MINORVERSION_NUM', pg_version_minor)
cdata.set('PG_VERSION_NUM', pg_version_num)

cdata.set('PACKAGE_IVORYSQL_VERSION', ivorysql_version)
cdata.set_quoted('PACKAGE_IVORYSQL_VERSION', ivorysql_version)
# PG_VERSION_STR is built later, it depends on compiler test results
cdata.set_quoted('CONFIGURE_ARGS', '')

Expand Down Expand Up @@ -2982,7 +2982,7 @@ cdata.set_quoted('DLSUFFIX', dlsuffix)
cdata.set_quoted('PG_VERSION_STR',
'PostgreSQL (IvorySQL @6@) @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
pg_version, host_machine.cpu_family(), host_system,
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, cdata.get('PACKAGE_IVORYSQL_VERSION')
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, ivorysql_version
)
)
Comment on lines 2982 to 2987
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Make PG_VERSION_STR ordering match Autoconf and example output.

Meson currently emits "PostgreSQL (IvorySQL 5.0) 18.0 ...", while Autoconf emits "PostgreSQL 18.0 (IvorySQL 5.0) ...". Align with Autoconf and the PR examples for consistency across build systems.

Apply:

- cdata.set_quoted('PG_VERSION_STR',
-   'PostgreSQL (IvorySQL @6@) @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
+ cdata.set_quoted('PG_VERSION_STR',
+   'PostgreSQL @0@ (IvorySQL @6@) on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
     pg_version, host_machine.cpu_family(), host_system,
     cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, ivorysql_version
   )
 )


---

🏁 Script executed:

```shell
#!/bin/bash
# Locate and inspect meson.build around lines 2982-2987
if [ -f meson.build ]; then
  echo "=== meson.build lines 2980-2990 ==="
  sed -n '2980,2990p' meson.build
else
  echo "meson.build not found in root; searching..."
  find . -name meson.build -type f | head -5
fi

Length of output: 437


🏁 Script executed:

#!/bin/bash
# Search for Autoconf equivalents (configure.in, configure.ac, etc.)
echo "=== Looking for Autoconf files ==="
find . -name 'configure.*' -o -name 'config.in' -o -name 'config.ac' | head -10

Length of output: 49


🏁 Script executed:

#!/bin/bash
# Search for PG_VERSION_STR definitions in Autoconf files
echo "=== Searching for PG_VERSION_STR in Autoconf context ==="
rg -n 'PG_VERSION_STR' --type=in --type=ac -C5 2>/dev/null | head -50

Length of output: 56


🏁 Script executed:

#!/bin/bash
# Look for references to version ordering in comments or documentation
echo "=== Searching for version string format context ==="
rg -n 'PostgreSQL.*IvorySQL|IvorySQL.*PostgreSQL' -C3 2>/dev/null | head -40

Length of output: 2668


Align PG_VERSION_STR format order between Meson and Autoconf.

Meson currently outputs "PostgreSQL (IvorySQL @6@) @0@ on...", while Autoconf outputs "PostgreSQL @0@ (IvorySQL @6@) on...". Swap the positions of @0@ (pg_version) and the IvorySQL version in the format string to match Autoconf.

- cdata.set_quoted('PG_VERSION_STR',
-   'PostgreSQL (IvorySQL @6@) @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
+ cdata.set_quoted('PG_VERSION_STR',
+   'PostgreSQL @0@ (IvorySQL @6@) on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
     pg_version, host_machine.cpu_family(), host_system,
     cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, ivorysql_version
   )
 )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cdata.set_quoted('PG_VERSION_STR',
'PostgreSQL (IvorySQL @6@) @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
pg_version, host_machine.cpu_family(), host_system,
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, cdata.get('PACKAGE_IVORYSQL_VERSION')
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, ivorysql_version
)
)
cdata.set_quoted('PG_VERSION_STR',
'PostgreSQL @0@ (IvorySQL @6@) on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
pg_version, host_machine.cpu_family(), host_system,
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, ivorysql_version
)
)
🤖 Prompt for AI Agents
meson.build around lines 2982 to 2987: the PG_VERSION_STR format places the
pg_version before the IvorySQL tag, which differs from Autoconf's "PostgreSQL
@0@ (IvorySQL @6@) on..." ordering; swap the positions of the pg_version and the
IvorySQL version in the format string so pg_version appears immediately after
"PostgreSQL" and the IvorySQL tag appears in parentheses, keeping the rest of
the placeholders and arguments unchanged.


Expand Down
17 changes: 10 additions & 7 deletions src/bin/psql/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "mainloop.h"
#include "pqexpbuffer.h"
#include "psqlscanslash.h"
#include "ora_psqlscanslash.h"
#include "ora_psqlscanslash.h"
#include "settings.h"
#include "variables.h"

Expand Down Expand Up @@ -311,7 +311,7 @@ HandleSlashCmds(PsqlScanState scan_state,
/* if there is a trailing \\, swallow it */
if (db_mode == DB_PG)
psql_scan_slash_command_end(scan_state);
else if(db_mode == DB_ORACLE)
else if (db_mode == DB_ORACLE)
ora_psql_scan_slash_command_end(scan_state);

free(cmd);
Expand Down Expand Up @@ -1059,6 +1059,7 @@ exec_command_d(PsqlScanState scan_state, bool active_branch, const char *cmd)
show_system = strchr(cmd, 'S') ? true : false;

getDbCompatibleMode(pset.db);

/*
* The 'x' option turns expanded mode on for this command only. This
* is allowed in all \d* commands, except \d by itself, since \dx is a
Expand Down Expand Up @@ -3628,6 +3629,7 @@ static backslashResult
exec_command_parser(PsqlScanState scan_state, bool active_branch)
{
bool success = true;

if (active_branch)
{
getDbCompatibleMode(pset.db);
Expand Down Expand Up @@ -5286,7 +5288,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
/* header line width in expanded mode */
else if (strcmp(param, "xheader_width") == 0)
{
if (! value)
if (!value)
;
else if (pg_strcasecmp(value, "full") == 0)
popt->topt.expanded_header_width_type = PRINT_XHEADER_FULL;
Expand Down Expand Up @@ -5838,15 +5840,16 @@ pset_value_string(const char *param, printQueryOpt *popt)
else if (strcmp(param, "xheader_width") == 0)
{
if (popt->topt.expanded_header_width_type == PRINT_XHEADER_FULL)
return(pstrdup("full"));
return (pstrdup("full"));
else if (popt->topt.expanded_header_width_type == PRINT_XHEADER_COLUMN)
return(pstrdup("column"));
return (pstrdup("column"));
else if (popt->topt.expanded_header_width_type == PRINT_XHEADER_PAGE)
return(pstrdup("page"));
return (pstrdup("page"));
else
{
/* must be PRINT_XHEADER_EXACT_WIDTH */
char wbuff[32];
char wbuff[32];

snprintf(wbuff, sizeof(wbuff), "%d",
popt->topt.expanded_header_exact_width);
return pstrdup(wbuff);
Expand Down
3 changes: 3 additions & 0 deletions src/include/pg_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@
/* PostgreSQL version as a number */
#undef PG_VERSION_NUM

/*IvorySQL version as a string*/
#undef PACKAGE_IVORYSQL_VERSION

Comment on lines +633 to +635
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Header placeholder added; ensure Autoconf defines it.

The #undef exposes PACKAGE_IVORYSQL_VERSION, but Autoconf must define it for non‑Meson builds. Verify configure.ac (or generated configure) sets and AC_DEFINEs PACKAGE_IVORYSQL_VERSION, else clients will see it undefined.

Run:


🏁 Script executed:

#!/bin/bash
# Verify Autoconf defines PACKAGE_IVORYSQL_VERSION
rg -nP 'AC_DEFINE(_UNQUOTED)?\s*\(\s*PACKAGE_IVORYSQL_VERSION' configure.ac || true
rg -nP '\bPACKAGE_IVORYSQL_VERSION\b' configure.ac || true

Length of output: 159


Need to verify if PACKAGE_IVORYSQL_VERSION is defined via AC_SUBST or other mechanisms.


---

🏁 Script executed:

```shell
#!/bin/bash
# Check for AC_SUBST assignment and surrounding context
rg -nP -B5 -A5 'PACKAGE_IVORYSQL_VERSION' configure.ac

Length of output: 555


Need to find where PACKAGE_IVORYSQL_VERSION is assigned.


---

🏁 Script executed:

```shell
#!/bin/bash
# Search for where PACKAGE_IVORYSQL_VERSION is assigned or AC_SUBSTed
rg -nP 'PACKAGE_IVORYSQL_VERSION\s*=' configure.ac
rg -nP 'AC_SUBST\s*\(\s*PACKAGE_IVORYSQL_VERSION' configure.ac

Length of output: 0


The variable appears undefined. Let me search more broadly for IvorySQL context and verify the pg_config.h.in file:


---

🏁 Script executed:

```shell
#!/bin/bash
# Search broadly for IVORYSQL references
rg -nP 'IVORYSQL' configure.ac | head -20

# Check pg_config.h.in around the specified lines
echo "=== pg_config.h.in lines 630-640 ==="
sed -n '630,640p' src/include/pg_config.h.in

Length of output: 504


PACKAGE_IVORYSQL_VERSION is undefined in configure.ac; AC_DEFINE is missing.

Verification confirms the review concern is valid. PACKAGE_IVORYSQL_VERSION is used in configure.ac line 2556 within AC_DEFINE_UNQUOTED(PG_VERSION_STR, ...) but is never initialized or defined. The #undef PACKAGE_IVORYSQL_VERSION in pg_config.h.in will remain unsubstituted, and the shell expansion will produce an empty version string.

Required fix: Add AC_DEFINE_UNQUOTED(PACKAGE_IVORYSQL_VERSION, [...]) or initialize the variable in configure.ac before its use at line 2556. Without this, non-Meson builds will have an incomplete IvorySQL version string.

🤖 Prompt for AI Agents
In src/include/pg_config.h.in around lines 633-635, PACKAGE_IVORYSQL_VERSION is
left undefined so the generated header contains an unsubstituted "#undef
PACKAGE_IVORYSQL_VERSION" and configure.ac later references it, producing an
empty version string; fix by adding an
AC_DEFINE_UNQUOTED(PACKAGE_IVORYSQL_VERSION, <version-value>) (or otherwise
initialize PACKAGE_IVORYSQL_VERSION) in configure.ac before line 2556 so the
configure run will substitute the macro into pg_config.h.in and embed a correct
IvorySQL version in non-Meson builds.

/* A string containing the version number, platform, and C compiler */
#undef PG_VERSION_STR

Expand Down