On Thu, 2007-06-14 at 18:57 +0200, Nis Jorgensen wrote:
> ZebZiggle wrote:
> > Further investigation ... the sql looks good I think:
> >
> > ...
> > FROM ...
> > WHERE ( ...
> > AND "igapp_stockticker"."moment" < 2007-06-14 05:00:00
> > AND "igapp_stockticker"."moment" >= 2007-06-13 05:00:00)
> >
> > Is there some special markup required for postgres to utilize the time
> > info?
> >   
> That looks very strange. Date literals are supposedly required to be in
> single quotes in postgresql.

What you see is not quite what you (or the database) gets, in this case.
 
The SQL printed by Django in its debug log is not precisely what is sent
to the backend. There is still a layer of quoting that is done by the
database wrapper (psycopg or MySQLdb, etc) and we print out the debug
SQL *before* that happens.

So what is sent to the database is correctly quoted. Otherwise every
datetime query in Django would fail.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to