[postmodern-devel] setting default value for serial column in prepared insert statement execution
Ivan Boldyrev
lispnik at gmail.com
Sun Sep 4 07:25:13 UTC 2011
On Sun, Sep 4, 2011 at 2:12 PM, Antony <lisp.linux at gmail.com> wrote:
> Hi
>
> I was trying to find how to use the 'serial' (auto increment) type through
> cl-postgres prepared insert statement execution.
>
> According to
> http://www.postgresql.org/docs/9.0/interactive/datatype-numeric.html#DATATYPE-SERIAL
> I basically have two choices for defaulting a serial column value
> 1. pass the DEFAULT keyword for the column value
CL-USER> (s-sql:sql (:insert-into 'table :set 'id (:raw "default")
'name "Antony"))
"INSERT INTO \"table\" (id, name) VALUES (default, E'Antony')"
--
Ivan Boldyrev
More information about the postmodern-devel
mailing list