Thread: Triggers not portable across different pg versions
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