Re: ERROR : column c.reltriggers does not exist

From: dmp <danap(at)ttc-cmc(dot)net>
To: "M(dot)R(dot) Muthukumar" <m_muthukumar(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: ERROR : column c.reltriggers does not exist
Date: 2009-10-19 20:51:39
Message-ID: 4ADCD15B.2000506@ttc-cmc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm showing in PostgreSQL 8.3.3 has the field reltriggers, but in 8.4.0 the
field no longer exists and looks like may have been replaced with
relhastriggers,
which is boolean? Try:

SELECT c.relname AS "Name",
n.nspname AS "Schema",
pg_get_userbyid(c.relowner) AS "Owner",
t.spcname AS "Tablespace",
c.relhasindex AS "Has Indexes",
c.relhasrules AS "Has Rules",
(c.relhastriggers = 'f') AS "Has Triggers",
c.relisshared AS "Is Shared",
c.relnatts AS "N Cols",
pg_catalog.obj_description(c.oid, 'pg_class') AS "Comment"
FROM pg_class c
LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace
WHERE c.relkind = 'r'::"char"
AND n.nspname LIKE 'public'
AND c.relname LIKE '%'
ORDER BY n.nspname, c.relname

danap
http://dandymadeproductions.com

>I am using dbvisualizer with postgresql-8.4-701.jdbc3.jar, postgres server version is 8.4.1
>When I try to get the table definition I am getting the following error :
>
>ERROR: column c.reltriggers does not exist
>Position: 414
>
>Details are :
>
>The command that caused the problem:
>SELECT c.relname AS "Name",
> n.nspname AS "Schema",
> pg_get_userbyid(c.relowner) AS "Owner",
> t.spcname AS "Tablespace",
> c.relhasindex AS "Has Indexes",
> c.relhasrules AS "Has Rules",
> (c.reltriggers > 0) AS "Has Triggers",
> c.relisshared AS "Is Shared",
> c.relnatts AS "N Cols",
> pg_catalog.obj_description(c.oid, 'pg_class') AS "Comment"
>FROM pg_class c
> LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
> LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace
>WHERE c.relkind = 'r'::"char"
>AND n.nspname LIKE 'public'
>AND c.relname LIKE '%'
>ORDER BY n.nspname, c.relname
>
>I am thinking reltriggers column is no longer in pg_class in 8.4.1 version. Is there a updated
>JDBC driver for 8.4.x.
>
>Any help is greatly appreciated.
>
>Thanks a bunch.
>
>-Muthu
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message dmp 2009-10-19 21:23:28 Re: ERROR : column c.reltriggers does not exist
Previous Message Dave Cramer 2009-10-19 19:40:10 Re: ERROR : column c.reltriggers does not exist