agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: sramay <nic.srama@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Strange Query - Reg
Date: Mon, 9 Mar 2015 01:35:33 -0700 (MST)
Message-ID: <1425890133399-5841071.post@n5.nabble.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

Hi,

In my postgresql instance in both 9.2 and 9.4 ( community version).  I am
getting the following query executed
often ( most of the time).   Why?   The query is seems to be related to
catalog management?    Why it happens 
can any one give light in this regard?


 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

Thanking you in advance,

Regards

Ramachandran S



--
View this message in context: http://postgresql.nabble.com/Strange-Query-Reg-tp5841071.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (4+ messages)  latest in thread

Message-ID: <1425890133399-5841071.post@n5.nabble.com>
Permalink:  ../1425890133399-5841071.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1425890133399-5841071.post@n5.nabble.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: nic.srama@gmail.com
  Subject: Re: Strange Query - Reg
  In-Reply-To: <1425890133399-5841071.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox