[OPEN-ILS-GENERAL] Problems Loading Bibliographic Records in Batch
Dan Scott
dan at coffeecode.net
Fri Nov 20 12:00:01 EST 2009
Hi Alan:
On Fri, 2009-11-20 at 09:27 -0500, Alan Simon wrote:
> Hello -
>
<snip>
> Step 4, using the commands 'psql -h localhost -U evergreen [db_pwd
> redacted]' and '# \i ~/sample_record.sql' produces the error output:
>
> SET
> BEGIN
> setval
> -----------
> 137726545
> (1 row)
>
> psql:sample_record.sql:16: ERROR: trigger
> "zzz_update_materialized_simple_record_tgr" for table "real_full_rec"
> does not exist
> CONTEXT: SQL function "disable_materialized_simple_record_trigger"
> statement 1
> psql:sample_record.sql:17: ERROR: current transaction is aborted,
> commands ignored until end of transaction block
Hmm, it looks like pg_loader.pl is still generating the "SELECT
reporter.disable_materialized_simple_record_trigger();" statement, even
though the database schema does not create the corresponding trigger by
default anymore.
Remove the following line from sample_record.sql and your load should
proceed successfully:
line 16: SELECT reporter.disable_materialized_simple_record_trigger();
You'll also need to schedule
Open-ILS/src/support-scripts/regenerate_simple_rec_view.sql to run on a
nightly basis.
I'll take a crack at the corresponding bug fix / documentation update
around this issue, as I believe others have hit it as well.
One thing that comes to mind is that the "DROP TRIGGER" statement that
goes with reporter.disable_materialized_simple_record_trigger() could
be amended to DROP TRIGGER IF EXISTS to avoid generating erros - but
that might be dependent on PostgreSQL version. Seems to be in 8.3 and
8.4 at least.
More information about the Open-ils-general
mailing list