In the postgresql-test RPM, the contrib .so's that are used by the tests are installed right in the directory where the tests are run. We must adjust the CREATE FUNCTION commands accordingly. Note that this also means that the specfile has to copy the .so's into the test directory while doing the in-build-tree regression tests. diff -Naur postgresql-8.3RC2.orig/src/test/regress/input/create_function_1.source postgresql-8.3RC2/src/test/regress/input/create_function_1.source --- postgresql-8.3RC2.orig/src/test/regress/input/create_function_1.source 2006-02-27 11:09:50.000000000 -0500 +++ postgresql-8.3RC2/src/test/regress/input/create_function_1.source 2008-01-18 13:38:51.000000000 -0500 @@ -24,17 +24,17 @@ CREATE FUNCTION check_primary_key () RETURNS trigger - AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@' + AS '@abs_builddir@/refint@DLSUFFIX@' LANGUAGE C; CREATE FUNCTION check_foreign_key () RETURNS trigger - AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@' + AS '@abs_builddir@/refint@DLSUFFIX@' LANGUAGE C; CREATE FUNCTION autoinc () RETURNS trigger - AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@' + AS '@abs_builddir@/autoinc@DLSUFFIX@' LANGUAGE C; CREATE FUNCTION funny_dup17 () diff -Naur postgresql-8.3RC2.orig/src/test/regress/output/create_function_1.source postgresql-8.3RC2/src/test/regress/output/create_function_1.source --- postgresql-8.3RC2.orig/src/test/regress/output/create_function_1.source 2007-06-18 17:40:58.000000000 -0400 +++ postgresql-8.3RC2/src/test/regress/output/create_function_1.source 2008-01-18 13:38:51.000000000 -0500 @@ -25,15 +25,15 @@ NOTICE: argument type city_budget is only a shell CREATE FUNCTION check_primary_key () RETURNS trigger - AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@' + AS '@abs_builddir@/refint@DLSUFFIX@' LANGUAGE C; CREATE FUNCTION check_foreign_key () RETURNS trigger - AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@' + AS '@abs_builddir@/refint@DLSUFFIX@' LANGUAGE C; CREATE FUNCTION autoinc () RETURNS trigger - AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@' + AS '@abs_builddir@/autoinc@DLSUFFIX@' LANGUAGE C; CREATE FUNCTION funny_dup17 () RETURNS trigger