Andy,

Am I correct in thinking that you are pointing out that while
(query "select name from countries where id=$1" 27)
(("Singapore"))

works

(query "copy $1 to$2" "countries" "/home/sabra/test/test.dat")

does not work?

Sabra

On Fri, Nov 12, 2010 at 8:07 PM, <achambers@mcna.net> wrote:
Hi,

Am I correct in thinking that there is currently no way to parameterize raw SQL strings to be sent through postmodern?  I realize most SQL can be expressed as S-SQL but it doesn't seem to support COPY syntax yet.  I added the function `sql-fmt' for this purpose and am submitting it to the list in case it's useful for others....

(defun sql-fmt (fmt &rest args)
 (apply 'format nil fmt (mapcar 'sql-ize args)))

In my repo [1], I added this to the :export list of both s-sql and postmodern packages.  Please pull the change or let me know if you need this changed in any way.

[1]: https://github.com/cddr/Postmodern/commits/master

Cheers,
Andy




_______________________________________________
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel