Re: Aliased table.
Russ Tyndall <[email protected]> Tue, 12 Oct 2010 09:23:58 -0400
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
As patched below, identifiers that should be quoted will not be (identifiers with a space or other special character in them) I think that it should follow rules something like: If an alias or name: has a space (or other special character in it) in it it must be quoted has been specified as a string, its casing should be preserved and it should be quoted is a symbol without any special chars should be printed without quotes, such that the sql engine will use its default case. I have a version that I think might work correctly here: http://paste.lisp.org/display/115437 Please discuss, and I hope this helps, Russ Tyndall Acceleration.net On 10/11/2010 4:18 PM, Michael Raskin wrote: > On 10/11/2010 11:30 PM, Michael Raskin wrote: >> What are the drawbacks of this patch? > Technically, it was incorrect because of lack of #\Space character in > the output. The corrected patch (tested and working nice): > > # patch "sql/expressions.lisp" > # from [7eae7583a0a34c3728ddcaf4e2e32f33ed33f0d4] > # to [e5a988302a7d429da8a2a108f334e07a1a78bc68] > # > ============================================================ > --- sql/expressions.lisp 7eae7583a0a34c3728ddcaf4e2e32f33ed33f0d4 > +++ sql/expressions.lisp e5a988302a7d429da8a2a108f334e07a1a78bc68 > @@ -200,7 +200,7 @@ > (symbol > (write-string (sql-escape name) *sql-stream*))) > (when alias > - (format *sql-stream* " ~s" alias))) > + (format *sql-stream* " ~a" (sql-escape alias)))) > t) > > (defmethod output-sql-hash-key ((expr sql-ident-table) database) > _______________________________________________ > CLSQL mailing list > [email protected] > http://lists.b9.com/cgi-bin/mailman/listinfo/clsql