Skip to content

Feature/pg18 support - #18

Open
walker83 wants to merge 3 commits into
lance-format:mainfrom
walker83:feature/pg18-support
Open

walker83 wants to merge 3 commits into
lance-format:mainfrom
walker83:feature/pg18-support

Conversation

@walker83

Copy link
Copy Markdown

增加PG 18支持

add pg 18 support

walker added 3 commits September 27, 2026 11:01
pgrx 0.14.3 does not support PostgreSQL 18 (pg18 support landed in
pgrx 0.15.0, and the PG18 hooks API was fixed in 0.16.0).

- Bump pgrx and pgrx-tests to =0.16.1
- Add pg18 feature alongside existing pg13..pg17
- Change default feature to pg18 (target platform for this fork)
- Note: Android (aarch64-linux-android) still fails to build due to
  lance-linalg build.rs; see #5746 and #2411 in lance-format/lance.
  A local [patch.crates-io] override is required until upstream fixes
  land.
lance-namespace 1.0.x OpenAPI schema added 'identity' and 'context'
fields to ListTablesRequest and ListNamespacesRequest. Use
..Default::default() to fill them.

DatasetBuilder::from_namespace() in lance 1.0.x removed its third
boolean parameter; drop it from all three call sites.
PostgreSQL 18 restructured TupleDescData: the 'attrs' field
(FormData_pg_attribute array) was replaced by 'compact_attrs'
(CompactAttribute array). CompactAttribute omits attname and atttypid,
so direct attribute access via (*tupdesc).attrs.as_ptr().add(i) no
longer compiles.

PostgreSQL's tupdesc.h provides a static inline TupleDescAttr() helper
that resolves the i-th FormData_pg_attribute by walking past the
compact_attrs array. pgrx 0.16.1 does not bindgen this inline function
(still TODO in pgrx), so add a small Rust equivalent in convert.rs
and call it from all five former attrs.as_ptr() sites.

Also update create_foreignscan_path() for PG18's new signature:
a 'disabled_nodes: c_int' parameter was inserted after 'rows'.
Pass 0 (no disabled nodes) for this extension.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant