[postmodern-devel] Question on returning multi-dimensional arrays
Sabra Crolleton
sabra.crolleton at gmail.com
Sat Nov 27 23:09:51 UTC 2010
Hello all,
I'm having trouble trying to get a array result out of a database.
Assume
(query "create table test2 ( id integer, name text, stuff1 integer[] ,
stuff2 integer[][])")
(query "insert into test2 values
(5,'t5',array[21,78,93,24],array[[83,92],[16,27]])")
If I'm at a psql command line, then
select stuff2[1:2][1] from test2 where id=5;
returns
{{83},{16}}
If I try to use postmodern, eg:
(query "select stuff2[1:2][1] from test2 where id=5")
I get an error message about junk in the result:
junk in string "{83"
[Condition of type SB-INT:SIMPLE-PARSE-ERROR]
I'm likely missing something obvious. Everything is fine if I'm only trying
to get a single item out of the array, but ideally I'd like to just pull the
entire array out directly into a variable. Any suggestions or pointers would
be appreciated.
Sabra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20101127/c15bcff3/attachment.html>
More information about the postmodern-devel
mailing list