pg_dump and CHECK constraints

From: Curt Sampson <cjs(at)cynic(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_dump and CHECK constraints
Date: 2004-01-26 13:31:16
Message-ID: Pine.NEB.4.58.0401262220340.555@angelic-vtfw.cvpn.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I notice that pg_dump is still dumping CHECK constraints with the table,
rather than at the very end, as it does with all the other constraints.
As discussed in bug report #787, at

http://archives.postgresql.org/pgsql-bugs/2002-09/msg00278.php

this breaks your restore if your CHECK constraint uses a user-defined
function.

1. Does anybody have any plans to fix this in the very near future?

2. If not, is there something that makes it particularly hard to
fix? I notice, Tom, that in your reply to that bug report you
intimated that this wasn't an easy fix, but I don't see why CHECK
constraints couldn't be added at the end of the dump, just as all
the other constraints are. Presumably, your message being late 2002,
this was before pg_dump was modified to re-order stuff?

3. If we created a patch for this at my work, would it be accepted?

I dunno...this looks really easy to me....

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.NetBSD.org
Don't you know, in this new Dark Age, we're all light. --XTC

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2004-01-26 13:36:59 Re: cache control?
Previous Message ohp 2004-01-26 13:25:58 what does it mean