From 6e197d05b11f07963bb2c9041e0a2a79a4eb92e6 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 4 Jan 2011 16:09:17 +0000 Subject: [PATCH] oils_xpath_table was too strict about field nullness -- we need /some/ data, not /all/ data, to be present git-svn-id: svn://svn.open-ils.org/ILS/trunk@19101 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.functions.config.sql | 2 +- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql | 4 +- .../0474.schema.xpath_table-empty-fields.sql | 67 ++++++++++++++++++++++ 4 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0474.schema.xpath_table-empty-fields.sql diff --git a/Open-ILS/src/sql/Pg/002.functions.config.sql b/Open-ILS/src/sql/Pg/002.functions.config.sql index f54607838c..1a967db55d 100644 --- a/Open-ILS/src/sql/Pg/002.functions.config.sql +++ b/Open-ILS/src/sql/Pg/002.functions.config.sql @@ -308,7 +308,7 @@ BEGIN q := $q$ SELECT * FROM ( SELECT $q$ || ARRAY_TO_STRING( select_list, ', ' ) || $q$ FROM $q$ || relation_name || $q$ WHERE ($q$ || criteria || $q$) -)x WHERE $q$ || ARRAY_TO_STRING( where_list, ' AND ' ); +)x WHERE $q$ || ARRAY_TO_STRING( where_list, ' OR ' ); -- RAISE NOTICE 'query: %', q; FOR out_record IN EXECUTE q LOOP diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index dcfebc3118..ec1b957ff5 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -70,7 +70,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0473'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0474'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql index 2dc7043be9..a3a99a9fae 100644 --- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql @@ -31,7 +31,7 @@ UPDATE biblio.record_entry SET marc = '