X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2AFC9D1B1B6 for ; Thu, 8 Jul 2004 08:10:16 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74537-10 for ; Thu, 8 Jul 2004 11:10:15 +0000 (GMT) Received: from fe06.axelero.hu (fe06.axelero.hu [195.228.240.94]) by svr1.postgresql.org (Postfix) with ESMTP id 761BDD1B1AB for ; Thu, 8 Jul 2004 08:10:11 -0300 (ADT) Received: from fe06 (localhost-02 [127.0.2.1]) by fe06.axelero.hu (8.12.11/8.12.11) with SMTP id i68BABhC022583 for ; Thu, 8 Jul 2004 13:10:11 +0200 (CEST) Received: from fe06.axelero.hu [127.0.2.1] via SMTP gateway by fe06 [195.228.240.94]; id A058322F5EE at Thu, 08 Jul 2004 13:10:11 +0200 Received: from fejleszt4 (121-248-182-81.adsl-fixip.axelero.hu [81.182.248.121]) by fe06.axelero.hu (8.12.11/8.12.11) with SMTP id i68BA90R022546 for ; Thu, 8 Jul 2004 13:10:10 +0200 (CEST) Message-ID: <002801c464dc$196c09b0$0403a8c0@fejleszt4> From: "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" To: Subject: Constraint->function dependency and dump in 7.3 Date: Thu, 8 Jul 2004 13:09:54 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-RAVMilter-Version: 8.4.3(snapshot 20030217) (fe06.axelero.hu) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/32 X-Sequence-Number: 18284 Dear Gurus, Just recently realized that our daily dump from a 7.3 (production) db to a 7.4 (development) server has problems. I have no idea where to search for an answer so please feel free to point me to the appropriate thread, doc or TFM :) Below is two portions of the dump, which seems to be in the wrong order (at least for me). I'm not sure, and not in a position to easily test it, that it's wrong order in 7.3; but 7.4 has problems creating the table without the function (which is logical): %----------------------- cut here -----------------------% CREATE TABLE cim ( -- etc etc ... orszag_kod integer, CONSTRAINT cim_orszag_kod CHECK ((hely_fajta(orszag_kod) = 7)) ); -- ... several lines later: CREATE FUNCTION hely_fajta (integer) RETURNS integer AS ' ... ' LANGUAGE sql; %----------------------- cut here -----------------------% Checked pg_depend, and constraint cim_orszag_kod refers to function hely_fajta, but noone (not even the table) refers to the constraint. I'm just wondering if it's ok... 1) is it normal that the table does not refer to its constraints? 2) if not, do you have the idea of the possible cause? 3) if so, is it normal for pg_dump to dump in this order? 4) if so, how may I change it? 5) may inserting into pg_depend solve the problem? TIA, G. %----------------------- cut here -----------------------% \end