[postmodern-devel] Regression in handling integer dates and timestamps

Lucas Hope lucas.r.hope at gmail.com
Fri Feb 10 04:00:35 UTC 2012


Additional:

My notes say that it succeeded on
~/quicklisp/dists/quicklisp/software/postmodern-20110619-git and failed on
~/quicklisp/dists/quicklisp/software/postmodern-20110829-git .

-Luke

On Fri, Feb 10, 2012 at 2:36 PM, Lucas Hope <lucas.r.hope at gmail.com> wrote:

> Hi there,
>
> The following code sample used to work on postmodern-20110219-git (using
> quicklisp from that period). However it now breaks. I can no longer insert
> integers as dates or timestamps into tables. Updates don't work either, but
> the example below uses insert:
>
> (ql:quickload "postmodern") ;; quicklisp version released yesterday
> - postmodern-20111203-git
>
> (pomo:connect-toplevel "date_test" "snip" "snip" "localhost")
>
> (gethash "integer_datetimes" (pomo::connection-parameters pomo:*database*))
> => "on"
> => T
>
> (pomo:execute "create table date ( value date );")
>
> (pomo:execute "insert into date ( value ) values ( $1 )" "2010-01-01")
>
> (setf date (pomo:query "select * from date limit 1" :single))
> => 3471292800
>
> (ignore-errors (pomo:execute "insert into date ( value ) values ( $1 )"
> date))
> => NIL
> => #<CL-POSTGRES-ERROR:INVALID-DATETIME-FORMAT {1004A00391}>
>
> (pomo:execute "create table timestamp ( value timestamp );")
>
> (pomo:execute "insert into timestamp ( value ) values ( $1 )" "2010-01-01")
> 1
> 1
>
> (setf timestamp (pomo:query "select * from timestamp limit 1" :single))
> => 3471292800
>
> (ignore-errors (pomo:execute "insert into timestamp ( value ) values ( $1
> )" timestamp))
> => NIL
> => #<CL-POSTGRES-ERROR:INVALID-DATETIME-FORMAT {100403F391}>
>
>
> --
> ---------------------------------------------------
> Dr Lucas Hope - lucas.r.hope at skype
> Machine Learning and Software Engineering Consultant
> Melbourne, Australia
>



-- 
---------------------------------------------------
Dr Lucas Hope - lucas.r.hope at skype
Machine Learning and Software Engineering Consultant
Melbourne, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20120210/ea0bd399/attachment.html>


More information about the postmodern-devel mailing list