On Fri, Jul 26 2013, Julien Danjou wrote:
> Does that sounds like a good idea, or do I miss an obvious problem?
For the record and people interested in that hack, I really find it
quite handy in the end. And it's easy enough to change cl-postgres/s-sql
behaviour:
(defmethod s-sql:sq
me to debug a lot of implicit nil conversion to 'false' in text
fields.
I recognize this is something that would break compatibility, so that
might be enabled via a defparameter or something.
Does that sounds like a good idea, or do I miss an obvious problem?
--
Julien Danjou
;; Free Sof
ssing by a conversion to its string
representation, but it seems impossible.
But this seems to work fine, event with DAO as far as I can see.
Cheers,
--
Julien Danjou
;; Free Software hacker ; freelance consultant
;; http://julien.danjou.info
signature.asc
Description: PGP signature
his help?
Not really unfortunatelly, unless I've missed the obvious.
I've still have no clue on how to insert "2013-01-01 12:00:00 UTC" into
PG. Your first example inserted "2013-01-01 04:00:00 UTC", and the
second example inserted "2013-01-01 03:00:00 UTC".
Thanks!
--
Julien Danjou
/* Free Software hacker * freelance consultant
http://julien.danjou.info */
signature.asc
Description: PGP signature
t
2013-01-01 12:00:00+02
(which is correct because the CL timezone and the PG timezone matches)
b. you INSERT (encode-timestamp 0 0 0 12 01 01 2013 :timezone UTC) it will
insert
2013-01-01 10:00:00+02
(which is wrong since the timestamp is in UTC)
And here I'm on case b.
--
Jul
at connection time.
Now, I've read through cl-postgres code, and I was hoping being able to
plug my code at connection time, but it seems everything is defined as
function and not as method, which seems weird to me, and not really
pluggable in the end.
Any hint appreciated!
Cheers,
--
Jul
---
doc/s-sql.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/s-sql.html b/doc/s-sql.html
index a6b0bad..7a8476a 100644
--- a/doc/s-sql.html
+++ b/doc/s-sql.html
@@ -595,7 +595,7 @@
(age :type integer)
(address :type (or db-null string) :references (important-a
or mytimestamp))
(:metaclass dao-class))
And try to do:
(setf (mytimestamp user) '(:now))
(update-dao user)
This raises things like:
Value (:NOW) can not be converted to an SQL literal.
at run-time.
Maybe `setf' is not the right way to modify this field here?
--
Julien Danjo
ork⦠But I'm
worring of what would happen if my field was not a timestamp but a text?
--
Julien Danjou
;; Free Software hacker & freelance
;; http://julien.danjou.info
pgp8SUtvCbtjk.pgp
Description: PGP signature
___
postmodern-devel mailing
Hi,
I'm trying to use NOW() as a value in an update statement using the DAO.
I've tried of syntax combinations, but I can't get the right one.
Hint?
--
Julien Danjou
/* Free Software hacker & freelance
http://julien.danjou.info */
pgpePto1GKOZ9.pgp
Descrip
; cd ~/quicklisp/local-projects
> git clone git://github.com/marijnh/Postmodern.git
>
> That local checkout will override Quicklisp's version of Postmodern.
Awesome, thanks for your answer!
--
Julien Danjou
/* Free Software hacker & freelance
http://julien.danjou.in
me discover that MD5
was used to authenticate. Then, changing 'md5' to 'password' in
pg_hba.conf allowed me to connect using postmodern!
It seems that the MD5 auth scheme is broken somehow in postmodern, or
that I miss something. I'm using PostgreSQL 9.2 FWIW.
Hint?
--
12 matches
Mail list logo