Triggers not portable across different pg versions

From: google(at)vrane(dot)com (google)
To: pgsql-general(at)postgresql(dot)org
Subject: Triggers not portable across different pg versions
Date: 2002-04-13 17:58:41
Message-ID: 13a650e8.0204130958.37ca6962@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Building intelligence into the sql database instead of into front end
applications is frequently advocated. One reason is portability.
Dumping and restoring is supposedly all that is needed to move
database from somewhere to somewhere else.

Well I had transferred a small amount of intelligence from my mod_perl
front ends to pg in the form of triggers. Guess what? I got an error
when I upgrade from 7.1.3 to 7.2. Trigger is written in plpgsql.
Dumpdata is looking for a hard coded path. I don't think it's very
clever at all.

Here is the message I get when I restore

#####
ERROR: stat failed on file '/usr/local/pg7.1/lib/plpgsql.so': No such
file or directory
ERROR: PL handler function plpgsql_call_handler() doesn't exist
#####

I can fix this by creating a bogus path and putting plpgsql.so that
comes with 7.2 there. Still I should not have to do that.

Any suggestions? Am I doing some thing wrong.

Here is the command for my dump

$ pg_dumpall > dump_all

Here is how I restore

$ psql template1 < dumpall

pg_dumall is 7.1.3 version.

I have tried both versions 7.1.3 and 7.2 for psql

Thanks

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2002-04-13 18:13:06 COPY performance
Previous Message Frank Hilliard 2002-04-13 17:54:14 Re: PostgreSQL - regularly sync.ing remote and local data