X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fexpressions.lisp;h=cd1a6d397bc9a2665bf0472a80d5d14aa563e602;hp=766da12e6a3c9dba19b628aa608617d186c4da76;hb=78489032c6f66ce666ffe5e2e726503b61b94616;hpb=e75e62c7127f074ef2b2add3d2850c42dfaf590e diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 766da12..cd1a6d3 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -589,15 +589,16 @@ uninclusive, and the args from that keyword to the end." (string-equal (slot-value a 'alias) (slot-value b 'alias)) t) - (string-equal (symbol-name (slot-value a 'name)) - (symbol-name (slot-value b 'name)))))) + (string-equal (sql-escape (slot-value a 'name)) + (sql-escape (slot-value b 'name)))))) (typecase from (list (output-sql (apply #'vector (remove-duplicates from :test #'ident-table-equal)) database)) (string (write-string from *sql-stream*)) - (t (output-sql from database))))) + (t (let ((*in-subselect* t)) + (output-sql from database)))))) (when inner-join (write-string " INNER JOIN " *sql-stream*) (output-sql inner-join database))