[postmodern-devel] Can interval be zero?
Slobodan Milnović
slobodan.milnovic at gmail.com
Sun Jan 23 18:01:55 UTC 2011
Hi,
I have an situation where I have an interval of "zero" time that I
would like to put with the other data in the table. When I try with
the (simple-date:encode-interval :millisecond 0) I get the object
> (simple-date:encode-interval :millisecond 0)
> #<SIMPLE-DATE:INTERVAL P>
But, when I try to insert this object into the table with the
insert-dao, I get the following error (I have left out other fields,
for other non-zero values of interval the insert works fine).
Database error 22007: invalid input syntax for type interval: ""
Query: INSERT INTO mytable (someinterval) VALUES (interval E'')
RETURNING somevalue
[Condition of type CL-POSTGRES-ERROR:INVALID-DATETIME-FORMAT]
I'm using latest postmodern from the git repository
https://github.com/marijnh/Postmodern.git
For now I'll use (simple-date:encode-interval :millisecond 1), but I'm
wondering if this is an issue with postmodern or postgresql?
More information about the postmodern-devel
mailing list