Question about pg_catalog.pg_trigger.

From: "Bhat, Suma" <Suma_Bhat(at)bmc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Question about pg_catalog.pg_trigger.
Date: 2008-04-04 14:21:12
Message-ID: 75D4CB285B87F14283FF51FCD5C2FBA31186EE9B@hou-ex-06.adprod.bmc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We are upgrading our system from postgresql-8.2.0 to postgresql-8.3.1.

With postgresql-8.2.0,

SELECT c1.relname as PKTABLE_NAME, c2.relname as FKTABLE_NAME,
t1.tgconstrname, a.attnum as keyseq, ic.relname as
fkeyname, t1.tgdeferrable, t1.tginitdeferred,
t1.tgnargs, t1.tgargs FROM pg_catalog.pg_namespace n1
JOIN pg_catalog.pg_class c1 ON (c1.relnamespace = n1.oid) JOIN
pg_catalog.pg_index i ON (c1.oid = i.indrelid) JOIN
pg_catalog.pg_class ic ON (i.indexrelid = ic.oid) JOIN
pg_catalog.pg_attribute a ON (ic.oid = a.attrelid),
pg_catalog.pg_namespace n2 JOIN pg_catalog.pg_class c2 ON
(c2.relnamespace = n2.oid), pg_catalog.pg_trigger t1 JOIN
pg_catalog.pg_proc p1 ON (t1.tgfoid = p1.oid),
pg_catalog.pg_trigger t2 JOIN pg_catalog.pg_proc p2 ON (t2.tgfoid =
p2.oid) WHERE (t1.tgrelid=c1.oid AND t1.tgisconstraint AND
t1.tgconstrrelid=c2.oid AND p1.proname LIKE 'RI\\_FKey\\_%\\_upd')
AND (t2.tgrelid=c1.oid AND t2.tgisconstraint AND
t2.tgconstrrelid=c2.oid AND p2.proname LIKE 'RI\\_FKey\\_%\\_del')
AND i.indisprimary AND n2.nspname = 'public' ORDER BY FKTABLE_NAME ,
tgconstrname, keyseq;

Would come back with values like:

ref_a_c_l_right_sets_a_c_l\000a_c_l_right_sets\000a_c_l\000UNSPECIFIED\0
00a_c_l_id\000a_c_l_id\000

for t1.tgargs.

but with postgresql-8.3.1, t1.args values are empty.

Can someone please explain what changed and how I need to update this
query ?

Thanks much,

Suma

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aidan Van Dyk 2008-04-04 15:03:01 Re: modules
Previous Message Andrew Dunstan 2008-04-04 14:17:30 Re: modules