Treat OCLC numbers specially in maintain_control_numbers
authorDan Scott <dan@coffeecode.net>
Thu, 21 Jul 2011 14:18:55 +0000 (10:18 -0400)
committerDan Scott <dan@coffeecode.net>
Thu, 21 Jul 2011 14:25:59 +0000 (10:25 -0400)
commite0e6390193d30bc4a247ec4566d6490b4c023237
tree814ef001b03767dbe8f31dbbf29663418ab0d927
parentb82f69844875d05272cc6d93d90b2160f0f9acf4
Treat OCLC numbers specially in maintain_control_numbers

For some reason, many records that come with OCLC numbers in the 001
field are not populated with a 003 field. This resulted in the OCLC
number being thrown away entirely, rather than being moved into the 035,
as there was no corresponding control number identifier field.

However, given that we know that control numbers starting with "ocm" or
"ocn" are special OCLC numbers, we can generate the 035 accordingly even
in the absence of a 003. This update to maintain_control_numbers()
teaches it to do the right thing for OCLC numbers.

In addition, add an identifier search index so we can easily find
records by their system control numbers (035 $a subfields).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/002.functions.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql