From a97f505ae72c3dfa7b11bfd637d8e31ef046983a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 2 Feb 2008 12:33:12 +0000 Subject: for update replace LIKE with '=' ; required by pg8.3 bigint --- CHANGELOG | 9 +++++++++ lib/sisu/v0/db_remove.rb | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 58f0b853..3ada78e4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,15 @@ Reverse Chronological: %% STABLE MANIFEST +%% sisu_0.64.3.orig.tar.gz (2008-02-02:04/6) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.64.3.orig.tar.gz + sisu_0.64.3.orig.tar.gz + sisu_0.64.3-1.dsc + sisu_0.64.3-1.diff.gz + + * db sql, for updates use match criteria '=' instead of LIKE + (required for pgsql 8.3 with bigint) + %% sisu_0.64.2.orig.tar.gz (2008-01-19:02/6) http://www.jus.uio.no/sisu/pkg/src/sisu_0.64.2.orig.tar.gz 4b0e97e4387c84ac4017128ef7718cf2 1485265 sisu_0.64.2.orig.tar.gz diff --git a/lib/sisu/v0/db_remove.rb b/lib/sisu/v0/db_remove.rb index 867f5d22..f84e3e05 100644 --- a/lib/sisu/v0/db_remove.rb +++ b/lib/sisu/v0/db_remove.rb @@ -72,19 +72,19 @@ module SiSU_DB_remove del_id=del.join #@conn.execute("BEGIN") @conn.execute(%{ - DELETE FROM endnotes WHERE metadata_tid LIKE '#{del_id}'; - DELETE FROM endnotes_asterisk WHERE metadata_tid LIKE '#{del_id}'; - DELETE FROM endnotes_plus WHERE metadata_tid LIKE '#{del_id}'; - DELETE FROM documents WHERE metadata_tid LIKE '#{del_id}'; - DELETE FROM urls WHERE metadata_tid LIKE '#{del_id}'; - DELETE FROM metadata WHERE tid LIKE '#{del_id}'; + DELETE FROM endnotes WHERE metadata_tid = '#{del_id}'; + DELETE FROM endnotes_asterisk WHERE metadata_tid = '#{del_id}'; + DELETE FROM endnotes_plus WHERE metadata_tid = '#{del_id}'; + DELETE FROM documents WHERE metadata_tid = '#{del_id}'; + DELETE FROM urls WHERE metadata_tid = '#{del_id}'; + DELETE FROM metadata WHERE tid = '#{del_id}'; /* - DELETE FROM documents WHERE documents.metadata_tid LIKE '#{del_id}'; - DELETE FROM endnotes WHERE endnotes.metadata_tid LIKE '#{del_id}'; - DELETE FROM endnotes_asterisk WHERE endnotes_asterisk.metadata_tid LIKE '#{del_id}'; - DELETE FROM endnotes_plus WHERE endnotes_plus.metadata_tid LIKE '#{del_id}'; - DELETE FROM urls WHERE urls.metadata_tid LIKE '#{del_id}'; - DELETE FROM metadata WHERE metadata.tid LIKE '#{del_id}'; + DELETE FROM documents WHERE documents.metadata_tid = '#{del_id}'; + DELETE FROM endnotes WHERE endnotes.metadata_tid = '#{del_id}'; + DELETE FROM endnotes_asterisk WHERE endnotes_asterisk.metadata_tid = '#{del_id}'; + DELETE FROM endnotes_plus WHERE endnotes_plus.metadata_tid = '#{del_id}'; + DELETE FROM urls WHERE urls.metadata_tid = '#{del_id}'; + DELETE FROM metadata WHERE metadata.tid = '#{del_id}'; */ }) #@conn.execute("COMMIT") -- cgit v1.2.3