From: | "Lewis Foti" <lewis(dot)foti(at)mentation(dot)com> |
---|---|
To: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: pg_dump of table including check rule fails to restore |
Date: | 2003-12-16 18:48:06 |
Message-ID: | MJEPJJCNLEBMDJFMDDABCEHOCDAA.lewis.foti@mentation.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Further to my original message I realise that the problem was due to the
text of the rule still referring to columns, src_section_id and
dst_section_id by their original names, parent_section_id and
child_section_id respectively. So the nature of the bug changes to that
pg_dump does not correctly export CHECK rules where the name of the
column(s) referred to has changed. Now IMHO that is somewhat subtle.
regards
Lewis
-----Original Message-----
From: Lewis Foti [mailto:lewis(dot)foti(at)mentation(dot)com]
Sent: 16 December 2003 18:26
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_dump of table including check rule fails to restore
Hi
I have a schema which includes one table with a CHECK constraint. After the
schema is dumped (with pg_dump) as ascii text attempts to recreate it using
the psql -f <filename> command cause this one table, called navigaion, to
fail to create. This is using postgresql 7.3.3 on Redhat 9.0. The fragment
of the dump is below. Is there a cure for this problem?
regards
Lewis
--
-- TOC entry 6 (OID 154551)
-- Name: navigation; Type: TABLE; Schema: public; Owner: wallet
--
CREATE TABLE navigation (
src_section_id integer NOT NULL,
dst_section_id integer NOT NULL,
rank smallint NOT NULL,
CHECK ((parent_section_id <> child_section_id))
) WITHOUT OIDS;
Lewis Foti
e: lewis(dot)foti(at)mentation(dot)com
m: +44 (0)7771 535943
w: www.mentation.com
From | Date | Subject | |
---|---|---|---|
Next Message | tim | 2003-12-16 20:22:30 | PG7.4 / psqlodbc / log_duration=true & client_min_messages=log / Can't connect |
Previous Message | Lewis Foti | 2003-12-16 18:26:23 | pg_dump of table including check rule fails to restore |