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
{{ message }}
Repository navigation
Commit 191abb4
Browse filesBrowse the repository at this point in the historyBrowse files
fix: skip range type constructor functions and qualify range columns (#683)
* fix: skip range type constructor functions and qualify range columns
A user-defined range type makes PostgreSQL create five LANGUAGE internal
constructor functions (range_constructor2/3, multirange_constructor0/1/2).
The function queries listed them as user functions, so a dump of any
database with a range type was not loadable. Filter out every pg_proc row
with an internal dependency, as pg_dump's getFuncs does, in the function,
procedure, aggregate and privilege queries.
Columns of a range or multirange type fell through the resolved_type CASE
to udt_name and lost their schema, so other.textrange rendered as
textrange. Qualify 'r' and 'm' types like enums; built-in int4range and
int4multirange stay bare.
Adds the testdata/dump/range suite as the regression and the design doc
for full range type support (this is its Phase 1).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs: canonical range functions can only be C, drop the shell-type bootstrap
PL/pgSQL rejects a shell type (a pseudo-type) as argument or return type
even with check_function_bodies off, and SQL rejects it outright, so a
canonical function is always a C function. Capture and render the option
but do not try to create the function or a shell type.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
"description": "User-defined range types: subtype_diff, an explicit multirange name, a cross-schema range with collation and operator class, and a table using range, multirange and built-in range columns",
4
+
"notes": [
5
+
"PostgreSQL creates five constructor functions (LANGUAGE internal) for every range type; they depend internally on the type and are not dumped, as in pg_dump.",
6
+
"A column of a range or multirange type from another schema keeps its schema prefix; built-in int4range and int4multirange stay bare.",
7
+
"The CREATE TYPE ... AS RANGE statements themselves are not yet dumped (Phase 2 of docs/plans/2026-11-05-range-types-design.md)."
0 commit comments