Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions docs/RELEASE-LAYOUT-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ apt-get install -y libluajit-5.1-2 libuv1 zlib1g

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

# 按你实际使用的驱动安装
brew install libpq # lunet.postgres (requires libpq client >= 17)
brew install libpq # lunet.postgres (requires libpq CLIENT >= 17; server can be pg16+)
brew install mysql-client # lunet.mysql
# sqlite3 使用系统库 - 无需额外安装
```
Expand Down
4 changes: 2 additions & 2 deletions docs/RELEASE-LAYOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ apt-get install -y libluajit-5.1-2 libuv1 zlib1g

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

# Per driver you actually use
brew install libpq # lunet.postgres (requires libpq client >= 17)
brew install libpq # lunet.postgres (requires libpq CLIENT >= 17; server can be pg16+)
brew install mysql-client # lunet.mysql
# sqlite3 uses the system lib - no extra package needed
```
Expand Down
5 changes: 5 additions & 0 deletions ext/postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ with an older client library fails at build time with a named error
rather than silently producing an unusable module. Install libpq 17+ (see
[RELEASE-LAYOUT.md](../docs/RELEASE-LAYOUT.md)).

The floor is on the **libpq client library** at build/load time, not on the
PostgreSQL server version: a libpq 17+ client talks to a pg16 server (for
example Scaleway serverless Postgres) without issue — only the client
library present when the module is built and loaded must be 17 or newer.

| Function | Notes |
|---|---|
| `open(config)` | `host`, `port`, `user`, `password`, `database`, optional `connect_timeout`, `sslmode`, `pool_size` (default 1) |
Expand Down
2 changes: 1 addition & 1 deletion spec/postgres_spec.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe("postgres module #native", function()
local ok, pg = pcall(require, "lunet.postgres")
if not ok then
pending("lunet.postgres not built (xmake build lunet-postgres)", function() end)
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)
return
end

Expand Down
Loading