Skip to content

Commit 5090b3f

Browse files
authored
Merge pull request #244 from lua-lunet/216-postgres-libpq-floor
docs(postgres): state libpq client floor (>=17) and client-vs-server distinction (closes #223)
2 parents ca0a196 + e5d7544 commit 5090b3f

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎docs/RELEASE-LAYOUT-CN.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ apt-get install -y libluajit-5.1-2 libuv1 zlib1g
365365

366366
# 按你实际 require() 的驱动安装 - 不需要的可跳过
367367
apt-get install -y libcurl4 # lunet.httpc
368-
apt-get install -y libpq5 # lunet.postgres (requires libpq client >= 17)
368+
apt-get install -y libpq5 # lunet.postgres (requires libpq CLIENT >= 17; server can be pg16+)
369369
apt-get install -y libmariadb3 # lunet.mysql(在 Debian trixie 上提供 libmysqlclient.so)
370370
apt-get install -y libsqlite3-0 # lunet.sqlite3
371371
```
@@ -379,7 +379,7 @@ PAXE(`liblunet_paxe`)与 crypto(`liblunet_crypto`)扩展各自静态链
379379
brew install luajit libuv
380380

381381
# 按你实际使用的驱动安装
382-
brew install libpq # lunet.postgres (requires libpq client >= 17)
382+
brew install libpq # lunet.postgres (requires libpq CLIENT >= 17; server can be pg16+)
383383
brew install mysql-client # lunet.mysql
384384
# sqlite3 使用系统库 - 无需额外安装
385385
```

‎docs/RELEASE-LAYOUT.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ apt-get install -y libluajit-5.1-2 libuv1 zlib1g
392392

393393
# Per driver you actually use - skip the ones you don't require()
394394
apt-get install -y libcurl4 # lunet.httpc
395-
apt-get install -y libpq5 # lunet.postgres (requires libpq client >= 17)
395+
apt-get install -y libpq5 # lunet.postgres (requires libpq CLIENT >= 17; server can be pg16+)
396396
apt-get install -y libmariadb3 # lunet.mysql (provides libmysqlclient.so on Debian trixie)
397397
apt-get install -y libsqlite3-0 # lunet.sqlite3
398398
```
@@ -406,7 +406,7 @@ The PAXE (`liblunet_paxe`) and crypto (`liblunet_crypto`) extensions each link l
406406
brew install luajit libuv
407407

408408
# Per driver you actually use
409-
brew install libpq # lunet.postgres (requires libpq client >= 17)
409+
brew install libpq # lunet.postgres (requires libpq CLIENT >= 17; server can be pg16+)
410410
brew install mysql-client # lunet.mysql
411411
# sqlite3 uses the system lib - no extra package needed
412412
```

‎ext/postgres/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ with an older client library fails at build time with a named error
1515
rather than silently producing an unusable module. Install libpq 17+ (see
1616
[RELEASE-LAYOUT.md](../docs/RELEASE-LAYOUT.md)).
1717

18+
The floor is on the **libpq client library** at build/load time, not on the
19+
PostgreSQL server version: a libpq 17+ client talks to a pg16 server (for
20+
example Scaleway serverless Postgres) without issue — only the client
21+
library present when the module is built and loaded must be 17 or newer.
22+
1823
| Function | Notes |
1924
|---|---|
2025
| `open(config)` | `host`, `port`, `user`, `password`, `database`, optional `connect_timeout`, `sslmode`, `pool_size` (default 1) |

‎spec/postgres_spec.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe("postgres module #native", function()
22
local ok, pg = pcall(require, "lunet.postgres")
33
if not ok then
4-
pending("lunet.postgres not built (xmake build lunet-postgres)", function() end)
4+
pending("lunet.postgres not built (xmake build lunet-postgres); if the build failed, check the libpq client library floor (libpq >= 17 required) — see ext/postgres/README.md", function() end)
55
return
66
end
77

0 commit comments

Comments
 (0)