Re: Strange Query - Reg

From: bricklen <bricklen(at)gmail(dot)com>
To: sramay <nic(dot)srama(at)gmail(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Strange Query - Reg
Date: 2015-03-14 14:20:54
Message-ID: CAGrpgQ_fz3XA0ZN+FGtt0YtrN06Qj3XvoGUHp=sLU-RRx3o2=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Mar 9, 2015 at 1:35 AM, sramay <nic(dot)srama(at)gmail(dot)com> wrote:

>
>
> SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, ct.relname AS
> TABLE_NAME, NOT i.indisunique AS NON_UNIQUE, NULL AS INDEX_QUALIFIER,
> ci.relname AS INDEX_NAME, CASE i.indisclustered WHEN true THEN 1
> ELSE CASE am.amname WHEN 'hash' THEN 2 ELSE 3 END END AS
> TYPE, (i.keys).n AS ORDINAL_POSITION,
> pg_catalog.pg_get_indexdef(ci.oid,
> (i.keys).n, false) AS COLUMN_NAME, CASE am.amcanorder WHEN true THEN
> CASE i.indoption[(i.keys).n - 1] & 1 WHEN 1 THEN 'D' ELSE 'A'
> END ELSE NULL END AS ASC_OR_DESC, ci.reltuples AS CARDINALITY,
> ci.relpages AS PAGES, pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS
> FILTER_CONDITION FROM pg_catalog.pg_class ct JOIN pg_catalog.pg_namespace
> n ON (ct.relnamespace = n.oid) JOIN (SELECT i.indexrelid, i.indrelid,
> i.indoption, i.indisunique, i.indisclustered, i.indpred,
> i.indexprs, information_schema._pg_expandarray(i.indkey) AS keys
> FROM pg_catalog.pg_index i) i ON (ct.oid = i.ind
>

Are you running PgAdmin or another GUI client app?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Alexander Uspensky 2015-03-15 08:51:13 Perfomance 9.1.9 vs 9.4.1
Previous Message Jason Aleski 2015-03-12 04:10:08 Re: Find inconsistencies in data with date range