Opened 8 years ago
Last modified 8 years ago
#3766 closed defect
geometry_columns and raster_columns views do not list parent partitioned tables of PostgreSQL 10 — at Initial Version
Reported by: | robe | Owned by: | robe |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 2.4.0 |
Component: | postgis | Version: | master |
Keywords: | postgresql 10 | Cc: |
Description
One of the new features of PostgreSQL 10 is declaritive partitioning.
Unfortunately it seems a parent partition table is not caught by our views though interestingly the child partitions are.
Here is an example that exercises the issue:
CREATE TABLE logs_geom_geog_parent_part ( log_id int GENERATED BY DEFAULT AS IDENTITY, log_ts timestamp with time zone NOT NULL DEFAULT current_timestamp, geom geometry(point), geog geography(point) ) PARTITION BY RANGE (log_ts); CREATE TABLE pgis_parent_part_child_1 PARTITION OF pgis_parent_part FOR VALUES FROM (unbounded) TO (unbounded);
Now if you do select from the various tables, you should have 2 records, but get back only one.
SELECT f_table_name AS t, f_geometry_column AS gc FROM geometry_columns;
t | gc --------------------------+------ pgis_parent_part_child_1 | geom (1 row)
SELECT r_table_name AS t, r_raster_column AS gc FROM raster_columns;
t | gc --------------------------+------ pgis_parent_part_child_1 | rast (1 row)
-- however geography does
SELECT f_table_name AS t, f_geography_column AS gc FROM geography_columns;
t | gc --------------------------+------ pgis_parent_part | geog pgis_parent_part_child_1 | geog (2 rows)
Not sure what makes geography_columns different from raster_columns and geometry_columns. I'm guessing it might be some sort of permission check we are doing perhaps in raster and geometry that we aren't doing in geography_columns.
FWIW, it's not just us. I notice in pgAdmin3 and pgADmin 4 (version 1.4), I can't see the parent partitions listed in the table tree.