Start a new topic

postgresql 10 beta - partition table

PostgreSQL version 10(beta) supports partitioned tables.

Table attribute 'p' has been added.

The parent table is not visible.


so.


It works after modifying as below.

      <Command id="postgresql8.getTables">
         <SQL>
            <![CDATA[
SELECT c.relname                                     AS "Name",
       n.nspname                                     AS "Schema",
       pg_get_userbyid(c.relowner)                   AS "Owner",
       t.spcname                                     AS "Tablespace",
       c.relhasindex                                 AS "Has Indexes",
       c.relhasrules                                 AS "Has Rules",
       ]]>
            <If test="#util.isDatabaseVersionGTE(8,4)">
               <![CDATA[
       c.relhastriggers                               AS "Has Triggers",
       ]]>
            </If>
            <Else>
               <![CDATA[
       (c.reltriggers > 0)                            AS "Has Triggers",
       ]]>
            </Else>
            <![CDATA[
       c.relisshared                                 AS "Is Shared",
       c.relnatts                                    AS "N Cols",
       pg_catalog.obj_description(c.oid, 'pg_class') AS "Comment"
FROM   pg_class c
   LEFT JOIN pg_namespace n   ON n.oid = c.relnamespace
   LEFT JOIN pg_tablespace t  ON t.oid = c.reltablespace
WHERE 1=1 
]]>
<If test="#util.isDatabaseVersionGTE(10,0)">
AND c.relkind in( 'r'::"char", 'p'::"char")
</If>
 <Else>
AND c.relkind in( 'r'::"char")
 </Else>
<![CDATA[
AND   n.nspname LIKE '${schema}'
AND   c.relname LIKE '${table}'
ORDER BY n.nspname, c.relname
            ]]>
         </SQL>
      </Command>

 


Thanks. We're currently running a beta testing of the upcoming 10.0 version. We'll include this in the next beta version.


Regards


Roger

Thank you. Roger.


Regards.

Can I buy dbvis with PostgreSQL 10 support?

 

Hi Konstantin,


The change discussed here is included in DbVisualizer 10.0, available for purchase now. Is there some other PostgreSQL 10 feature you would like to see supported? 


Best Regards,

Hans

Hi!

But on the page http://www.dbvis.com/features/ there is only PostgreSQL 8,9;
at http://www.dbvis.com/doc/postgresql-database-features/ there is no mention of new features. Release Notes 10.0, 10.0.1, 10.0.2 also do not contain PostgreSQL 10. Are they obsolete pages?

 

PostgreSQL 10 was released just a week ago, and we have not formally tested with it yet or looked at if there are any new features we should add support for. Once we've done that, the Supported Databases page will be updated to show formal support also for version 10. 


The features developed for earlier versions are more than likely to work fine also with PostgreSQL 10. We provide database-specific support for many different databases and add new features for new database version based on requests from our customers. If you find that we do not support something added in PostgreSQL 10, let us know and we will look into it.


Best Regards,

Hans


1 person likes this
Thank you.

 

Postgres 10 now allows for native partitioning. We will use this feature within a project in a
big german company. Currently, dbvis 10.0.4 does not recognize a partitioned table and handles
partitions just like regular tables. Thus we currently recommed pgAdmin4 v2.0 which correctly
subsumes all partitions under its parent table and subpartions under their partition and so on.
Maybe you want to add some cool partition features to dbvisualizer :)

Best regards
Wolfgang
 

 

Hi Wolfgang,


It would be great if you can briefly describe what features you would find helpful, so we can look into it. We made a small change a few versions back to list the partitioned tables along with regular tables, at the suggestion of another customer. I assume you would like to see them separated from regular tables with different actions and views?


Best Regards,

Hans

Hi Hans,

I really would like to post a screenshot of how pgAdmin4 v.20 handles partitions,
but I do not know if this is legal :)
So here is what we would like to see: let table A be partitioned and B and C be partitions of A.
Then:
- only A shall be listed under "Tables", but B and C may *not*
- for A there is a navigation sub-item "Partitions", because A is partitioned
- Unfolding "Partitions" under the navigation item of A shall show B and C
  as partitions.
- for the partitioned table A you could show interesting things like number of partitions
- for the partitions B and C you could show at least the partition constraints
Furthermore imagine a partioning wizard that helps in creating non-overlapping partitions,
or an analyzer that checks if data are unevenly spread among the partitions ... just be
creative :)
Native Partitions is THE feature of PostgreSQL 10. Thus a good handling of partitions might
be the main thing Postgres 10 users expect from a db management tool.

Best regards
Wolfgang

 

Hi Wolfgang,


Thanks. We will look into it and let you know if we add more support for partitioned tables.


Best Regards,

Hans

Wolfgang,


DbVisualizer 10.0.7 is now released with extended support for partitioned tables.


Open Help->Check for Update in DbVisualizer to perform the upgrade. 

An alternative is that you download from our web site: 


Regards

Roger
Hi Roger,

thank you! I just installed 10.0.8 and it really looks good!

I have seen only a few minor flaws:

- if you click on the partitioned table in the navigator, you can see the columns of the table in a tree view.

  But when you open this table in the database window (the big window on the right side), the "Columns"

  tab does not show the columns. No big deal, but this seems to be wrong ...

- I can see the new partition view only if I log in to the database as a superuser. If the partitioned table is

  owned by user "test_schema" and inside the schema "test_schema" and I log in as user "test_schema"

  then the partitions are shown as regular tables and the partitioned table (the master of the partitions) is

  missing at all.


Regards,

Wolfgang


Hi Wolfgang,


I can reproduce the first issue, i.e. that the Columns tab is empty, and will look into that.


However, I'm not able to reproduce the second issue. I have a schema named "test" in a database named "postgres". I connect with a user named "test" and create a partitioned table. Looking at the Info tab for this table I see that it is owned by user "test" and is part of the "test" schema. It shows up in the Databases tree as a table and its Partitions node list the partitions. Am I doing something different than the case you describe?


Best Regards,

Hans

Login or Signup to post a comment