 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Olegon
Joined: 07 Sep 2009 Posts: 40
|
|
PostgreSQL 10 support |
|
Hi!
Showing partitioned tables not supported.
Example:
 |
 |
CREATE TABLE public.table_with_parts
(
id integer NOT NULL,
date_fix date NOT NULL,
some_text character varying(200) COLLATE pg_catalog."default"
) PARTITION BY RANGE (date_fix)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.table_with_parts
OWNER to postgres;
-- Partitions SQL
CREATE TABLE public.before2017 PARTITION OF public.table_with_parts
FOR VALUES FROM ('1998-01-01') TO ('2017-01-01');
CREATE TABLE public.year2017 PARTITION OF public.table_with_parts
FOR VALUES FROM ('2017-01-01') TO ('2018-01-01');
CREATE TABLE public.year2018 PARTITION OF public.table_with_parts
FOR VALUES FROM ('2018-01-01') TO ('9999-01-01'); |
SQL Editor and assistant shows before2017, year2017, year2018 as tables but doesn't show main table table_with_parts. See attachment.
Fixed by added 'p' in DB Query 'Objects' (AND relkind IN ('r', 'f', 'v', 'S', 'm', 'p')). But maybe need more for additional showing.
|
|
Wed Sep 19, 2018 1:01 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Hi.
Thank you for letting us know.
I think a better fix for that would be to clone "Objects (PostgreSQL)" query using right-click menu then "Copy" command.
Rename that copy to "Objects (PostgreSQL)"
and then change the minimum version attribute in the copy to 10.
In the copy, modify the WHERE close of the first query to
 |
 |
...
WHERE relnamespace = :SCHEMA_ID
AND relkind IN ('r', 'f', 'v', 'S', 'm', 'p')
AND (relkind != 'r' OR relpartbound IS NULL) |
At the top, add the following line to the CASE excepression
 |
 |
WHEN 'p' THEN 'TA' |
That would show partitioned table as a whole and hide its individual partitions.
|
|
Wed Sep 19, 2018 10:12 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|