From: | "Richard Huxton" <dev(at)archonet(dot)com> |
---|---|
To: | "Harry Yau" <harry(dot)yau(at)regaltronic(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Adjustment to "Problem with dropping a FOREIGN KEY" |
Date: | 2001-03-26 14:22:56 |
Message-ID: | 004701c0b600$42243be0$1001a8c0@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
From: "Harry Yau" <harry(dot)yau(at)regaltronic(dot)com>
> Dear:
> Hi everybody, I've just found the pg_trigger and pg_class, but I am
> wondering how can i modify this two file. I've used VI to view it, but
> it appear in some strange font of character. Now, I start wonder are
> they actually text files or application program.
> If they were files, please tell me how can I delete or modify the
> context of these two file; otherwise, please show me how may I use them
> to drop the constraint trigger that was created by add foreign key.
They're database tables - don't use a text editor on them!
You can get a listing of all the system tables with \dS - they should all
begin with pg_
You can use normal queries to update the pg_triggers and pg_class tables (if
you have the right permissions - database owner should be good). You might
want to pg_dump things first in case of any problems.
Basically, I think postgres gets confused if the reltriggers count is zero
while you still have a trigger left in pg_triggers.
There is some information on system tables in the developer's docs at
www.postgresql.org
- Richard Huxton
From | Date | Subject | |
---|---|---|---|
Next Message | Mitch Vincent | 2001-03-26 14:38:46 | Re: Free Text Search |
Previous Message | Hasan Mokhtari | 2001-03-26 14:14:59 | help request |