Skip site navigation (1) Skip section navigation (2)

Importing SQL file into PostgreSQL database

From: Elliot Voris <evoris(at)slcconline(dot)edu>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Importing SQL file into PostgreSQL database
Date: 2011-07-13 18:43:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I work for a small college, where the library uses Evergreen to manage it's collection. The database is PostgreSQL driven. The server that Evergreen was running on crashed. The old server was running PostgreSQL 8.3. I've installed an updated version of Evergreen, including PostgreSQL 8.4.8. I have a backup of the database in a SQL file. When I try to import the file into the new database I get the following output:

postgres(at)server:~$ psql database < olddb.sql
(1 row)

ERROR:  function xml_is_well_formed(text) does not exist
LINE 1: SELECT xml_is_well_formed( $1 )

HINT: No function matches the given name and argument types. You might need to
add explicit type casts
QUERY:  SELECT xml_is_well_formed( $1 )
CONTEXT:  PL/pgSQL function "check_marcxml_well_formed" line 3 at IF
COPY record_entry, line 1: "-1  1       1       1       -1      2009-06-29 18:54
:59.184263+00   2009-06-29 15:54:59.184263+00   f       f               AUTOGEN-

1                           FOO"

I saw that XML Functions need PostgreSQL to be configured with libxml at install. Is there a way around that? Can I install XML Functions into my server after the fact?

Thanks for any and all help!

Elliot Voris


pgsql-admin by date

Next:From: Mark JohnsonDate: 2011-07-13 19:09:18
Subject: Re: read only error..hard reboot not work as well
Previous:From: Kevin GrittnerDate: 2011-07-13 15:46:19
Subject: Re: read only error..hard reboot not work as well

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group