Skip site navigation (1) Skip section navigation (2)

Re: database introspection error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Jon Nelson" <jnelson+pgsql(at)jamponi(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: database introspection error
Date: 2011-04-23 19:53:48
Message-ID: 4473.1303588428@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Jon Nelson <jnelson+pgsql(at)jamponi(dot)net> wrote:
>> Would the following query be more (most?) correct, assuming the
>> oid of the table is known?
 
> It doesn't seem to work for indexes on expressions.

Depends on what you mean by "work".  If you're looking for attributes
that are used as simple index columns, it's probably fine.  If you want
to also find attributes that are used in index expressions, you might
want to make use of a join through pg_depend.  One disadvantage of
pg_depend is that it doesn't help for system catalog indexes (because
indexes built at bootstrap time aren't included in pg_depend) --- not
sure if that is something SQLAlchemy cares about.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: nicola75ssDate: 2011-04-24 18:17:50
Subject: BUG #5993: pg_size_pretty overflow
Previous:From: Bryant, AlexDate: 2011-04-22 19:29:16
Subject: Upgrading from 1.10 to 1.12 - cannot set up server

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group