Your message dated Sat, 06 Dec 2014 05:23:08 +0000
with message-id <[email protected]>
and subject line Re: fails to handle mx.DateTime.DateTime and related objects
has caused the Debian Bug report #214466,
regarding fails to handle mx.DateTime.DateTime and related objects
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
214466: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=214466
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python2.3-psycopg
Version: 1.1.9-1
Severity: important

Example code showing the problem:

>>> c=dbc.cursor()
>>> c.execute("SELECT * from codes WHERE tst=%s;", 
>>> [mx.DateTime.TimeDeltaFrom(minutes=15)])
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
psycopg.ProgrammingError: ERROR:  parser: parse error at or near ":" at 
character 33
>>> c.execute("SELECT * from codes WHERE tst=%s;", 
>>> [mx.DateTime.DateTimeFrom(minutes=15)])
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
psycopg.ProgrammingError: ERROR:  parser: parse error at or near "00" at 
character 42

SELECT * from codes WHERE tst=2003-10-07 00:00:00.00;

this looks like a case of missing quotation marks in the generated code.

Wichert.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux tornado 2.6.0-test6 #5 Thu Oct 2 17:45:53 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8

Versions of packages python2.3-psycopg depends on:
ii  libc6                         2.3.2-8    GNU C Library: Shared libraries an
ii  libpq3                        7.3.4-5    Shared library libpq.so.3 for Post
ii  python2.3                     2.3.1-3    An interactive high-level object-o
ii  python2.3-egenix-mxdatetime   2.0.4-2    Date and time handling routines fo

-- no debconf information


-- 
Wichert Akkerman <[email protected]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.



--- End Message ---
--- Begin Message ---
I tried to reproduce that bug and could not:

import psycopg2
import mx.DateTime
conn = psycopg2.connect("host='localhost' dbname='test')
c = conn.cursor()
c.execute("SELECT * from codes WHERE tst=%s;",
[mx.DateTime.TimeDeltaFrom(minutes=15)])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
psycopg2.ProgrammingError: relation "codes" does not exist
LINE 1: SELECT * from codes WHERE tst='00:15:00.000000'::time;

So it looks like the mx objects are now properly quoted.

According to upstream changelog[1], there was no significant change in
mx handling since psycopg1, so this was probably fixed ages ago.

I'm closing this bug now, without version.

[1] http://pythonhosted.org/psycopg2/news.html

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to