How to change pg_trigger query so that it works in 9.0 without pg_trigger.tgisconstraint does not exist error

From: "Andrus Moor" <eetasoft(at)online(dot)ee>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How to change pg_trigger query so that it works in 9.0 without pg_trigger.tgisconstraint does not exist error
Date: 2010-10-16 10:33:25
Message-ID: A1F8967206944405893B9BA9C3C369E3@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In 9.0 query below returns error

7/42703:ERROR: column pg_trigger.tgisconstraint does not exist

How to change it so that it works in all servers starting at 8.0 (or at
least
from 8.1) to 9.0 ?
Or if this is not possible how to fix it so that it works in 9 ?

Andrus

SELECT
pg_catalog.pg_get_triggerdef(pg_trigger.oid) as trdef
FROM pg_catalog.pg_trigger
join pg_catalog.pg_class on pg_trigger.tgrelid = pg_class.oid
JOIN pg_catalog.pg_namespace ON pg_namespace.oid=pg_class.relnamespace
WHERE not pg_trigger.tgisconstraint
and pg_namespace.nspname='firma1'

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-10-16 13:44:16 Re: Request for comment: pgjson project
Previous Message Terry Laurenzo 2010-10-16 06:50:07 Request for comment: pgjson project