Search Postgresql Archives

Re: How do I drop a Complicated Constraint Trigger After Delete Execute Procedure?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Wang, Mary Y" <mary.y.wang@xxxxxxxxxx> writes:
> I got something here :
>  select * from pg_trigger where tgconstrname = 'bug_assigned_to_fk';
>  tgrelid |            tgname            | tgfoid | tgtype | tgenabled | tgisconstr                  aint |    tgconstrname    | tgconstrrelid | tgdeferrable | tginitdeferred | tgnarg                  s | tgattr |                                  tgargs                                                
> ---------+------------------------------+--------+--------+-----------+-----------                  -----+--------------------+---------------+--------------+----------------+-------                  --+--------+----------------------------------------------------------------------                  ----
>  7335118 | RI_ConstraintTrigger_9217018 |   1655 |     17 | t         | t                                | bug_assigned_to_fk |       7329978 | f            | f              |                         6 |        | bug_assigned_to_fk\000bug\000users\000FULL\000assigned_to\000user_id\                  000
>  7335118 | RI_ConstraintTrigger_9217016 |   1654 |      9 | t         | t                                | bug_assigned_to_fk |       7329978 | f            | f              |                         6 |        | bug_assigned_to_fk\000bug\000users\000FULL\000assigned_to\000user_id\                  000
>  7329978 | RI_ConstraintTrigger_9217014 |   1644 |     21 | t         | t                                | bug_assigned_to_fk |       7335118 | f            | f              |                         6 |        | bug_assigned_to_fk\000bug\000users\000FULL\000assigned_to\000user_id\                  000
> (3 rows)

Ah, right ... if memory were better, I'd have remembered that FK
triggers used to be named like this.  Try

	drop trigger "RI_ConstraintTrigger_9217018" on bugs;

and so forth.  I'm not sure which of the three triggers are
on which of the two tables, but it won't take you long to
find out.  (And yes, you need those double quotes.)

			regards, tom lane

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux