From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Relation 0 does not exist |
Date: | 2002-09-26 13:59:32 |
Message-ID: | 3624.1033048772@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> writes:
> then dumped with the v7.3 pg_dumpall which generated:
> CREATE CONSTRAINT TRIGGER "<unnamed>"
> AFTER INSERT OR UPDATE ON trans
> NOT DEFERRABLE INITIALLY IMMEDIATE
> FOR EACH ROW
> EXECUTE PROCEDURE "RI_FKey_check_ins" ('<unnamed>', 'trans', 'meter', 'UNSPE
> CIFIED', 'meter_id', 'id');
Yeek. The lack of a FROM <table> clause in that trigger definition is
why it's not working. IIRC, the FROM was optional in pre-7.3 releases,
but it is *required* now. (We probably should adjust the syntax
accordingly.)
7.3 pg_dump is not working hard enough to regenerate the appropriate
info, which we can fix, but I'm wondering how it got that way in the
first place. The bug that could originally cause tgconstrrelid to be
forgotten was a pg_dump bug that existed up to about 7.0. Is it
possible that these tables have a continuous history of being dumped
and reloaded back to 7.0 or before?
Anyway the quickest fix seems to be to manually drop the triggers
and reconstruct the FK relationships with ALTER TABLE ADD FOREIGN KEY
commands. If that seems too messy to do by hand, you can wait till
I've got a pg_dump patch to do it for you.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-09-26 14:11:09 | Re: postmaster -d option (was Re: [GENERAL] Relation 0 does not exist) |
Previous Message | Robert Treat | 2002-09-26 13:30:39 | Re: Nicer dump files? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-09-26 14:05:11 | Re: Insert Performance |
Previous Message | Jan Wieck | 2002-09-26 13:55:47 | Re: PGXLOG variable worthwhile? |