diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-02-02 12:33:12 +0000 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-02-02 12:33:12 +0000 |
commit | a97f505ae72c3dfa7b11bfd637d8e31ef046983a (patch) | |
tree | 5432f37da79e7721f679bf1e0b1c90a3b31fa44a | |
parent | sisu-0.64.2 + md5s (diff) |
for update replace LIKE with '=' ; required by pg8.3 bigint
-rw-r--r-- | CHANGELOG | 9 | ||||
-rw-r--r-- | lib/sisu/v0/db_remove.rb | 24 |
2 files changed, 21 insertions, 12 deletions
@@ -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") |