Aliased table.

Michael Raskin <jhyiugjhvbjh234-JGs/[email protected]> Mon, 11 Oct 2010 23:30:14 +0400
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
		Hello.
	I noticed that :table-alias property handler in sql expression writer
for a :from clause writes it with " ~s" format. This seems to create a
problem when you create a function and call it from another package.

	What are the drawbacks of this patch?

============================================================
--- sql/expressions.lisp        7eae7583a0a34c3728ddcaf4e2e32f33ed33f0d4
+++ sql/expressions.lisp        0acc308684b3abd2e6402e1528faf6930be1b06d
@@ -200,7 +200,7 @@
       (symbol
        (write-string (sql-escape name) *sql-stream*)))
     (when alias
-      (format *sql-stream* " ~s" alias)))
+      (write-string (sql-escape alias) *sql-stream*)))
   t)

 (defmethod output-sql-hash-key ((expr sql-ident-table) database)