[postmodern-devel] Inserting into an array

Sabra Crolleton sabra.crolleton at gmail.com
Sun Jan 13 05:58:30 UTC 2013


I thought I understood the s-sql syntax on inserting into an array. Then I
tried it. No, I do not understand the s-sql array syntax for an insert-into
statement.

Does anyone have a simple example?

As a sampe:
(query (:create-table test2 ((id :type serial) (name :type text) (stuff1
:type int4[]) (stuff1 :type int4[]))))

What would be the equivalent s-sql to

(query "insert into test2 values (1,'t2','{22,24,21,20}','{{2,4},{6,7}}')")

Such that

(query (:select (:[] 'stuff2 1 1) :from 'test2 :where (:= 'id 1)) :single)
#2A((2 4))

Thank you for any explanations or pointers.

Sabra Crolleton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20130112/d939e860/attachment.html>


More information about the postmodern-devel mailing list