I've been running a nightly pg_dump on an OpenACS 4.5 system running against PostgreSQL 7.2. (pg_dump comes from PostgreSQL 7.3, and I know that this is a bad thing, but I don't believe that my problem stems from that.) For a variety of reasons, including my ability to sleep at night, I've been trying to re-import the dumped data into PostgreSQL on another system.
Unfortunately, the import hasn't gone well. I've dumped the database with
pg_dump -O -x -d -U pgsql --host db openacs > /tmp/backup.sql
(I know that -d, which forces INSERT syntax, is slower than the default use of COPY. But then I got lost of \N characters that appear to represent NULL, but which psql wasn't able to handle on the re-import.)
When I try to re-import, psql chokes on the definition of tree_ancestor_keys, which is a recursive function. From reading the docs, I know that tree_ancestor_keys is defined in some clever-hackish way, but I'm wondering if there is any simple, useful, easy way for me to restore the system without resorting to similiar hacks.
Thanks for any and all assistance!