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,