From d77ffdd5904e25e51304bdefbca3a0887e75e82c Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 20 Apr 2004 01:00:07 +0000 Subject: [PATCH] r9109: changes for postgresql --- create-sql.lisp | 8 ++++---- parse-2002.lisp | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/create-sql.lisp b/create-sql.lisp index 66b9c02..fd513c4 100644 --- a/create-sql.lisp +++ b/create-sql.lisp @@ -112,8 +112,9 @@ (format nil " (~d)" length) ""))) ((:postgresql :postgresql-socket) + ;; FIXME: incorrect syntax (if (integerp length) - (format nil "substr(~A,1,~D)" colname length) + (format nil "substr((~A)::text,1,~D)" colname length) colname)) (t colname)))) @@ -152,7 +153,7 @@ (defun drop-index-cmd (colname tablename) "Return sql create index command" - (case *umls-sql-type + (case *umls-sql-type* (:mysql (format nil "DROP INDEX ~a ON ~a" (concatenate 'string tablename "_" colname "_X") @@ -164,8 +165,7 @@ (defun sql-create-indexes (conn &optional (indexes +index-cols+)) "SQL Databases: create all indexes" (dolist (idx indexes) - (ignore-errors - (sql-execute (drop-index-cmd (car idx) (cadr idx)) conn)) + (ignore-errors (sql-execute (drop-index-cmd (car idx) (cadr idx)) conn)) (sql-execute (create-index-cmd (car idx) (cadr idx) (caddr idx)) conn))) (defun make-usrl (conn) diff --git a/parse-2002.lisp b/parse-2002.lisp index 9c2a286..dd10ac0 100644 --- a/parse-2002.lisp +++ b/parse-2002.lisp @@ -228,7 +228,8 @@ ("SUI" "MRCON") ("CUI" "MRCXT") ("CUI" "MRDEF") ("CUI" "MRLO") ("CUI1" "MRREL") ("CUI" "MRSAT") ("LUI" "MRSAT") ("SUI" "MRSAT") ("CUI" "MRSO") ("SAB" "MRSO") ("SRL" "MRSO") ("CUI" "MRSTY") - ("TUI" "MRSTY") ("CUI" "MRXNS_ENG") ("NSTR" "MRXNS_ENG" 10) + ("TUI" "MRSTY") ("CUI" "MRXNS_ENG") + #+ignore ("NSTR" "MRXNS_ENG" 10) ("CUI" "MRXNW_ENG") ("NWD" "MRXNW_ENG") ("WD" "MRXW_ENG") ("KCUISUI" "MRCON") ("KCUILUI" "MRCON") ("KCUILRL" "MRCON") ("KLUILRL" "MRCON") ("KCUISUI" "MRCXT") -- 2.34.1