[postmodern-devel] darcs patch: add support for the currval() and lastval() functions

Nicolas Martyanoff khaelin at gmail.com
Mon Aug 31 08:10:52 UTC 2009


On 09-08-30 20:03, Marijn Haverbeke wrote:
> >    * (s-sql:sql-compile '(:select (:currval players_id_seq)))
> >    "(SELECT currval(players_id_seq))"
> 
> >    * (s-sql:sql-compile '(:select (:currval players_id_seq)))
> >    "(SELECT currval(E'players_id_seq'))"
> 
> > It seems that the default function expansion doesn't escape object names.
> 
> The Postgresql currval/nextval functions take strings. Passing a
> symbol, in S-SQL means passing an identifier. If you are generating
> s-sql expressions, have a symbol where you need a string, you can just
> call to-sql-name on it. Doing it that way should also make calling
> setval easier.

You seem to be right :) Perhaps should nextval() be removed then, for
consistency purpose.

Regards,

-- 
Nicolas Martyanoff
   http://codemore.org
   khaelin at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20090831/43ad9f02/attachment.sig>


More information about the postmodern-devel mailing list