Documentation: add a 'where' clause to bib record import stored procedure
authorYamil Suarez <yamil@yamil.com>
Thu, 8 May 2014 21:37:07 +0000 (17:37 -0400)
committerYamil Suarez <yamil@yamil.com>
Thu, 8 May 2014 21:37:07 +0000 (17:37 -0400)
The stored procedure for doing bib record import was lacking a 'where'
clause in one of the update statements.

Signed-off-by: Yamil Suarez <yamil@yamil.com>
docs/admin_initial_setup/migrating_your_data.txt

index da466ba..e65af47 100644 (file)
@@ -100,7 +100,8 @@ DECLARE stage RECORD;
 BEGIN
 FOR stage IN SELECT * FROM staging_records_import ORDER BY id LOOP
       INSERT INTO biblio.record_entry (marc, last_xact_id) VALUES (stage.marc, 'IMPORT');
-      UPDATE staging_records_import SET dest = currval('biblio.record_entry_id_seq');
+      UPDATE staging_records_import SET dest = currval('biblio.record_entry_id_seq') 
+       WHERE id = stage.id;
    END LOOP;
   END;
   $$ LANGUAGE plpgsql;