[postgis-tickets] [PostGIS] #3766: geometry_columns and raster_columns views do not list parent partitioned tables of PostgreSQL 10

PostGIS trac at osgeo.org
Sat May 27 08:53:30 PDT 2017


#3766: geometry_columns and raster_columns views do not list parent partitioned
tables of PostgreSQL 10
----------------------+---------------------------
  Reporter:  robe     |      Owner:  robe
      Type:  defect   |     Status:  assigned
  Priority:  blocker  |  Milestone:  PostGIS 2.4.0
 Component:  postgis  |    Version:  trunk
Resolution:           |   Keywords:  postgresql 10
----------------------+---------------------------
Description changed by robe:

Old 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 pgis_parent_part (
> id int GENERATED BY DEFAULT AS IDENTITY,
>  geom geometry(point), geog geography(point), rast raster
> ) PARTITION BY RANGE (id);
>

> 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.

New 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 pgis_parent_part (
 id int GENERATED BY DEFAULT AS IDENTITY,
  geom geometry(point), geog geography(point), rast raster
 ) PARTITION BY RANGE (id);


 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.

--

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3766#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list