Hi,<br>
<br>
Interesting. It seems to be happy if you give it a simple string "0 0:0:0", or, as you've uncovered, 1 millisecond.<br>
But it doesn't like the encoding if you use (simple-date:encode-interval :anything 0)<br>
<br>
Sabra<br><br><div class="gmail_quote">2011/1/23 Slobodan Milnović <span dir="ltr"><<a href="mailto:slobodan.milnovic@gmail.com">slobodan.milnovic@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
I have an situation where I have an interval of "zero" time that I<br>
would like to put with the other data in the table. When I try with<br>
the (simple-date:encode-interval :millisecond 0) I get the object<br>
<br>
> (simple-date:encode-interval :millisecond 0)<br>
> #<SIMPLE-DATE:INTERVAL P><br>
<br>
But, when I try to insert this object into the table with the<br>
insert-dao, I get the following error (I have left out other fields,<br>
for other non-zero values of interval the insert works fine).<br>
<br>
Database error 22007: invalid input syntax for type interval: ""<br>
Query: INSERT INTO mytable (someinterval) VALUES (interval E'')<br>
RETURNING somevalue<br>
   [Condition of type CL-POSTGRES-ERROR:INVALID-DATETIME-FORMAT]<br>
<br>
I'm using latest postmodern from the git repository<br>
<a href="https://github.com/marijnh/Postmodern.git" target="_blank">https://github.com/marijnh/Postmodern.git</a><br>
<br>
For now I'll use (simple-date:encode-interval :millisecond 1), but I'm<br>
wondering if this is an issue with postmodern or postgresql?<br>
<br>
_______________________________________________<br>
postmodern-devel mailing list<br>
<a href="mailto:postmodern-devel@common-lisp.net">postmodern-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel</a><br>
</blockquote></div><br>