From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Constraints & pg_dump |
Date: | 2004-03-17 07:19:49 |
Message-ID: | 200403162319.49467.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom,
> Isn't this already solved by dumping in dependency order?
>
> regards, tom lane
Nope. Problem is, the table depends on the function, and the function
depends on the table. pg_dump (in 7.4.1, at least) will dump the table
first, *with the constraint*, and then the function ... causing table
creation to fail.
And this isn't come cross-table function either; the constraint that they're
implementing is partial uniqueness, which is appropriate for a constraint.
I personally think that the simplest way to do this ... and deal with most
custom-function-constraint issues ... is to push all constraints containing a
user-defined function to the end of the file with the foriegn keys.
(this is for the Bricolage project)
--
Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-17 07:36:20 | Re: Constraints & pg_dump |
Previous Message | Jonathan M. Gardner | 2004-03-17 06:50:17 | Re: Doxygen? |