Re: pgbench - allow to create partitioned tables
От | Dilip Kumar |
---|---|
Тема | Re: pgbench - allow to create partitioned tables |
Дата | |
Msg-id | CAFiTN-u3n1o1Pu3hwJfK0ZTm-0_4OeQQ0QQbNUEE5chA46kVNQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgbench - allow to create partitioned tables (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: pgbench - allow to create partitioned tables
|
Список | pgsql-hackers |
On Wed, Sep 18, 2019 at 1:02 PM Fabien COELHO <coelho@cri.ensmp.fr> wrote: > */ + res = PQexec(con, + "select o.n, p.partstrat, pg_catalog.count(p.partrelid) " + "from pg_catalog.pg_class as c " + "join pg_catalog.pg_namespace as n on (n.oid = c.relnamespace) " + "cross join lateral (select pg_catalog.array_position(pg_catalog.current_schemas(true), n.nspname)) as o(n) " + "left join pg_catalog.pg_partitioned_table as p on (p.partrelid = c.oid) " + "left join pg_catalog.pg_inherits as i on (c.oid = i.inhparent) " + /* right name and schema in search_path */ + "where c.relname = 'pgbench_accounts' and o.n is not null " + "group by 1, 2 " + "order by 1 asc " I have a question, wouldn't it be sufficient to just group by 1? Are you expecting multiple pgbench_account tables partitioned by different strategy under the same schema? -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: