You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Install with a specific PostgreSQL grammar version (15, 16, or 17)
40
-
pie install flow-php/pg-query-ext --with-pg-version=16
41
-
42
-
# Or with a pre-installed libpg_query
39
+
# Or with a pre-installed libpg_query (must be version 17+)
43
40
pie install flow-php/pg-query-ext --with-pg-query=/usr/local
44
41
```
45
42
46
-
The extension will automatically download and build the appropriate libpg_query version if not found on your system.
47
-
48
-
**Supported PostgreSQL versions:**
43
+
The extension will automatically download and build libpg_query 17-latest if not found on your system.
49
44
50
-
| PostgreSQL | libpg_query version |
51
-
|------------|---------------------|
52
-
| 17 | 17-6.1.0 (default) |
53
-
| 16 | 16-5.2.0 |
54
-
| 15 | 15-4.2.4 |
45
+
> **Note:** This extension uses PostgreSQL 17 grammar (libpg_query 17-latest). It requires `postgres_deparse.h` which is only available in libpg_query 17+.
@@ -42,12 +22,14 @@ if test "$PHP_PG_QUERY" != "no"; then
42
22
AC_MSG_CHECKING([for libpg_query])
43
23
44
24
for i in $SEARCH_PATH ; do
45
-
if test -r "$i/pg_query.h" && test -r "$i/libpg_query.a"; then
25
+
dnl Check flat directory structure (headers and lib in same dir)
26
+
if test -r "$i/pg_query.h" && test -r "$i/postgres_deparse.h" && test -r "$i/libpg_query.a"; then
46
27
PG_QUERY_DIR=$i
47
28
AC_MSG_RESULT([found in $i])
48
29
break
49
30
fi
50
-
if test -r "$i/include/pg_query.h" && test -r "$i/lib/libpg_query.a"; then
31
+
dnl Check standard include/lib directory structure
32
+
if test -r "$i/include/pg_query.h" && test -r "$i/include/postgres_deparse.h" && test -r "$i/lib/libpg_query.a"; then
51
33
PG_QUERY_DIR=$i
52
34
PG_QUERY_INCLUDE_DIR="$i/include"
53
35
PG_QUERY_LIB_DIR="$i/lib"
@@ -61,7 +43,7 @@ if test "$PHP_PG_QUERY" != "no"; then
61
43
62
44
dnl Check bundled directory
63
45
if test -z "$PG_QUERY_DIR"; then
64
-
if test -r "$EXT_DIR/libpg_query/pg_query.h" && test -r "$EXT_DIR/libpg_query/libpg_query.a"; then
46
+
if test -r "$EXT_DIR/libpg_query/pg_query.h" && test -r "$EXT_DIR/libpg_query/postgres_deparse.h" && test -r "$EXT_DIR/libpg_query/libpg_query.a"; then
0 commit comments