From: Dan W. <kil...@us...> - 2002-02-26 15:28:03
|
: After setting up a 4 table database I attempted to recreate it on another : postgresql installation. To do this I ran the output of phpPgAdmin 2.4's "View : dump (schema) of database Structure only" on the other postgresql dbms (via the : same phpPgAdmin installation) by using the "Run SQL query/queries on database : test ... location of textfile" functionality. : : The table creations worked fine until the final section was reached. It choked : on the first command: : : CREATE CONSTRAINT TRIGGER RI_ConstraintTrigger_19979 AFTER INSERT OR UPDATE ON : queues NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE : RI_FKey_check_ins ('<unnamed>', 'queues', 'titles', 'UNSPECIFIED', 'tid', 'tid'); : : The error message is: "Error - /home/httpd/html/phpPgAdmin/sql.php -- Line: 112 : PostgreSQL said: ERROR: CreateTrigger: function ri_fkey_check_ins() does not : exist." : : PostgreSQL's version is "PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc : 2.96" on both of my dbmses. My PHP version is "Linux 2.2.14-5.0 #1 Tue Mar 7 : 21:07:39 EST 2000 i686". My linux is RedHat 7.1. : : I upgraded to phpPgAdmin 2.4a and reran both steps (sql file creation and : execution). Outcome is the same. Might postgresql 7.0.3 just be missing this : function? If yes, can i install that function w/o upgrading the whole dbms? This sure sounds like a version issue, but AFAIK, that function (used with referential integrity -- foreign keys, etc) was part of the 7.0.3 release. It's possible that it went through some changes that altered it's parameter lists though. This issue however, is not a phpPgAdmin issue, it is a postgresql issue and should be addressed to the postgres-general list. You might want to check to see if you can dump the database through psql and import it with psql as well. If that works, then it might be a problem in phpPgAdmin which we need to address. But unless that is the case, you will probably get better support for this issue in the -general mailing list. : george : : p.s. In phpPgAdmin's db_details.php file, I had to delete the enctype option to : the FORM tag to get the browser to send any data to the "action" file. The line : was: <form method="POST" action="file_sql.php" enctype="multipart/form-data">. : This was with Opera 6.0 tp2. Mozilla 0.9.7 had no response at all to my clicks : on "Go". You just removed the ability to upload dump files. I'm not sure why Mozilla and Opera had problems with the enctype. I guess we need to look into this issue. : p.p.s. phpPgAdmin is Cool software. Thanks... we continually try to make it better. -Dan |