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
The FDW validator in pg_lake_iceberg used error messages that said
options were "only valid for writable catalog=\"rest\"" when they are
actually valid for read-only external catalog tables (both catalog=rest
and catalog=object_store). Similarly, "required for catalog=\"rest\""
omitted that the same options are required for catalog=object_store
read-only tables. The error raised for an unknown "catalog" value also
listed only "rest" and "postgres", omitting "object_store".
Changes:
- Reword all "only valid for" / "required for" error messages for
catalog_name, catalog_namespace, catalog_table_name, and read_only
to accurately describe which catalog types they apply to.
- Update the "invalid catalog option" errdetail and surrounding block
comment to include object_store alongside rest and postgres.
- Remove a dead "catalog_namespace required" check: it only applied to
REST read-only (object_store excluded), but the REST ALTER whitelist
never allows touching catalog_namespace and CREATE auto-fills a
default, so the path was unreachable.
- Rework the comments in ProcessAlterTable: the outer block comment
now describes external catalog handling (was "rest" only) and the
validator interaction, and each per-branch comment accurately
describes which options that catalog type allows changing (the
previous object_store branch comment was a stale copy-paste of the
rest branch comment).
- Add a comment in option.c noting that the remaining "required"
checks act as a safety net for ALTER DROP scenarios.
Tests:
- test_iceberg_catalog_option_validation_errors (test_writable_iceberg.py):
exercises the four "only valid for read-only external catalog tables"
rejection paths plus the "invalid catalog option" path without
needing external infrastructure.
- test_object_store_read_only_alter_drop_required_options
(test_object_store_catalog.py): exercises the two "required" paths
via ALTER FOREIGN TABLE OPTIONS (DROP ...) on an object_store
read-only table.
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: sfc-gh-npuka <naisila.puka@snowflake.com>
0 commit comments