From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CUBE seems a bit confused about ORDER BY |
Date: | 2017-12-14 11:39:05 |
Message-ID: | ecd19b56-202f-89b6-1125-4290d50c1ab7@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> SELECT dep.classid::regclass AS class,
> CASE WHEN dep.classid = 'pg_catalog.pg_class'::regclass THEN
> dep.objid::regclass::text
> WHEN dep.classid = 'pg_catalog.pg_constraint'::regclass THEN (SELECT
> conname FROM pg_catalog.pg_constraint WHERE oid = dep.objid)
> ELSE NULL
> END AS name
> FROM
> pg_catalog.pg_extension e
> JOIN pg_catalog.pg_depend edep ON edep.refclassid =
> 'pg_catalog.pg_extension'::regclass AND edep.refobjid = e.oid AND deptype = 'e'
> AND edep.classid = 'pg_catalog.pg_operator'::regclass
> JOIN pg_catalog.pg_operator o ON o.oid = edep.objid AND o.oprname = '~>'
> JOIN pg_catalog.pg_depend dep ON dep.refclassid =
> 'pg_catalog.pg_operator'::regclass AND dep.refobjid = o.oid
> WHERE
> e.extname = 'cube' AND dep.classid IN ('pg_catalog.pg_constraint'::regclass,
> 'pg_catalog.pg_class'::regclass);
>
> On the below data schema
>
> create table tmp (c cube, check ((c ~> 0 > 0)));
> create index tmp_idx on tmp ((c~>0));
>
> it gives following result
>
> class | name
> ---------------+-------------
> pg_class | tmp_idx
> pg_constraint | tmp_c_check
> (2 rows)
SQL-query seems too huge for release notes and isn't looking for materialized
view (fixable) and functional indexes with function which contains this operator
somewhere inside (not fixable by this query). I think, just words is enough.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Konstantin Knizhnik | 2017-12-14 11:39:43 | Re: [HACKERS] Surjective functional indexes |
Previous Message | Teodor Sigaev | 2017-12-14 11:31:28 | Re: [HACKERS] [WIP] Zipfian distribution in pgbench |