Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Activity (RSS)

Thursday, November 03 2011
73 create = False was updated
  • yuri
    yuri commented at 3:48 PM

    "I cannot see it, I mean I can understand what has changes"

    I can't understand, sorry for the mistake.

  • yuri
    yuri commented at 3:47 PM

    Thank you for the fix. I cannot see it, I mean I can understand what has changes. Also github seems to be at 2.4.1 version, and not 2.4.2... I'm not very good w...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 3:15 PM

    yuri,

    could you test the behaviour with the current head version (e.g. you may check it out from the devel branch in https://github.com/dvarrazzo/psycopg/).

    The...

Tuesday, October 25 2011
73 create = False was updated
  • yuri
    yuri commented at 1:19 PM

    install a fresh zope
    create an adapter instance
    go in "test"
    write a wrong query

    Then, you cannot submit other queries bacause of "current transaction is aborte...

  • Federico Di Gregorio
    Federico Di Gregorio commented at 12:30 PM

    "create" isn't used at all in that method. What do you mean by "impossible to roll back with Zope". Can you make an example?

  • yuri
    yuri commented at 12:26 PM

    def getconn(self, create=True):

        conn = pool.getconn(self.dsn)
        if create == False:
         return conn
        conn.set_isolation_level(int(self.tilevel))
        ...
  • Psycopg website
    Psycopg website created the ticket at 12:19 PM

    Submitted by: yurj@alfa.it

    def getconn(self, create=True):

        conn = pool.getconn(self.dsn)
        conn.set_isolation_level(int(self.tilevel))
        conn.set_clien...
Friday, October 14 2011
52 Can't adapt type 'Decimal' was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 9:40 PM

    Committed.

  • Federico Di Gregorio
    Federico Di Gregorio commented at 7:19 AM

    I'd vote for moving the Decimal adapter registration to Python.
    Nobody uses the C module alone anyway.

72 ARRAY could not convert type double precision[] to numeric[] was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:21 PM

    I've tested with my collection of dbs and you need at least PostgreSQL 8.4.

  • Oscar Martinez
    Oscar Martinez commented at 1:22 PM

    Ok, I will ask the admin to upgrade it
    Thanks very much!

  • Daniele Varrazzo
    Daniele Varrazzo commented at 1:13 PM

    Your problem is in postgres: probably 8.1 doesn't support NaN in numeric array. Your test works fine with postgres 9.0.

  • Oscar Martinez
    Oscar Martinez commented at 12:43 PM

    Hi,

    Sorry for the lack of info. I post now the definition of the table. I have asked the admin to update the psycopg2 to the last one (2.4.2) but I still get th...

Thursday, October 13 2011
52 Can't adapt type 'Decimal' was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 6:15 PM

    About the other types: I think no: Decimal is the only pure python module imported and used by psycopg in the C layer, all the other builtins are python C types...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 6:11 PM

    Don't know about the other adapter, how do they do adaptation and all. Probably they have always done everything in Python and so ditched the problem.

  • Daniele Varrazzo
    Daniele Varrazzo commented at 6:08 PM

    After a quick review, the psyco_GetDecimalType is still required for the other half of the story: in order to return from Postgres to Python a Decimal type whos...

  • Marti Raudsepp
    Marti Raudsepp commented at 6:03 PM

    Cool. Are there any other built-in adapters we have to worry about?

    Have you checked what PyGreSQL and MySQLdb are doing to solve this problem?

  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 5:58 PM

    I've taken a look at the issue. Thank you for the test case: it worked fine and allowed me to debug a little bit.

    About the above approach of testing using ctyp...

72 ARRAY could not convert type double precision[] to numeric[] was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 3:49 PM

    Cannot reproduce the issue: adaptation seems performed ok. What is the definition of the table?

    With the lack of such definition I can only try a cast, and it s...

  • Psycopg website
    Psycopg website created the ticket at 3:24 PM

    Submitted by: oscar martinez

    Hi, I detected that when having a 3D array of double precesion and some of the values are nan it crashes.

    I paste the test I did (I...

Wednesday, October 12 2011
52 Can't adapt type 'Decimal' was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 4:38 PM

    I am planning to work at it, but don't have anything in the calendar. 2.4.3 is already to be released, waiting for fog, but I don't mind including a fix for it ...

  • Marti Raudsepp
    • Tag changed from adapt, decimal to adapt, decimal, django, mod_wsgi
    by Marti Raudsepp at 4:11 PM

    Are you working on a fix for this, or should I give it a shot myself?

    Unfortunately, I think we'll have to live with subinterpreters. Changing the default WSGIA...

Monday, October 10 2011
71 wrong quoting of text arrays was updated
  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 5:50 PM

    It is already fixed, to be released in 2.4.3.

    See this commit.

    Thank you for the report.

52 Can't adapt type 'Decimal' was updated
  • Daniele Varrazzo
    • State changed from invalid to new
    by Daniele Varrazzo at 5:40 PM

    I thought the apache guy had learned to not mess up with sub-interpreter. They are a bloody implementation detail, crap. Isn't there any deploy method not invol...

  • Marti Raudsepp
    Marti Raudsepp commented at 5:28 PM

    I have traced down the cause and attached a reproducible test case. Please re-open this bug.

    A few weeks ago I was re-reading the mod_wsgi documentation and not...

Sunday, October 09 2011
71 wrong quoting of text arrays was created
  • Bozo Dragojevic
    Bozo Dragojevic created the ticket at 8:45 AM

    with rel-2.4.2 I get the following error when running the attached testcase:

    $ nosetests tests/raw_psycopg2.py 
    F
    =============================================...
Thursday, September 22 2011
66 Array of composite/hstore type was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 6:03 PM

    Added hstore/composite (and generic) array support to my devel branch.

    To be released in 2.4.3.

70 support unicode strings in column list for copy_from() was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:10 AM

    What psycopg version are you using?

    The current head works fine: the problem has been most likely fixed in Psycopg 2.3 one year ago.

Friday, September 16 2011
70 support unicode strings in column list for copy_from() was created
  • Chris Curvey
    Chris Curvey created the ticket at 3:13 PM

    It would be a nice feature if the copy_from() method supported unicode strings. For example:

    import psycopg2
    
    conn = psycopg2.connect("host=192.168.0.33 user=c...
Monday, September 12 2011
68 copy_from ValueError "column list to long" was updated
  • Daniele Varrazzo
    • State changed from new to resolved
    • Tag set to copy
    by Daniele Varrazzo at 1:22 AM

    Fixed in my devel. To be released in 2.4.3.

67 RealDictCursor doesn't work with named cursors was updated
  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 1:15 AM

    Fixed in my devel. To be released in 2.4.3.

Friday, September 09 2011
69 PQescapeByteaConn does not escape backslashes on postgres 9.1 server was updated
  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 11:51 AM

    Brilliant, thanks for testing.

    I've open ticket #16778 on Django: https://code.djangoproject.com/ticket/16778

    Closing this bug as psycopg is doing ok here. Bye!

  • Jonathan Slenders
    Jonathan Slenders commented at 11:34 AM

    I can confirm this patach to be working.

  • Jonathan Slenders
    Jonathan Slenders commented at 11:08 AM

    Thanks, that was quick. I'll test it right now.

  • Daniele Varrazzo
    Daniele Varrazzo commented at 11:01 AM

    (please see for update to the above comment: I've submitted it before finishing)

  • Daniele Varrazzo
    Daniele Varrazzo commented at 10:54 AM

    Try with this patch. Please try with postgres servers using both parameters for standard_conforming_strings. If we are happy with it we can pass it to the djang...

3 earlier changes…
  • Jonathan Slenders
    Jonathan Slenders commented at 10:53 AM

    Thanks a lot, Daniele! I am indeed using the PostGIS adaptor, so that explains the issue.
    Hopefully, they will merge your patch asap into their trunk.

  • Daniele Varrazzo
    Daniele Varrazzo commented at 10:31 AM

    From the samples you posted, it looks psycopg is behaving as expected. What is in between your django program and psycopg?

    Are you using django's PostGIS adapte...

  • Jonathan Slenders
    Jonathan Slenders commented at 10:09 AM

    Indeed, somehow, I got the E with single backslashes...

    . >>> import psycopg2

    . >>> conn_string = "local_postgres8.4 database... ..."

    . >>> conn = psycopg2.conn...

Thursday, September 08 2011
68 copy_from ValueError "column list to long" was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 1:52 PM

    Does it mean the sum of the length of the column names is more than 8k chars? How long is that?

    Probably the author thought it would have been a safe limit... W...

69 PQescapeByteaConn does not escape backslashes on postgres 9.1 server was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 1:46 PM

    The difference in the output of PQescapeByteaConn is due to the standard_conforming_string setting: it is on by default in PG 9.1.

    The difference is taken into ...

  • Federico Di Gregorio
    Federico Di Gregorio commented at 1:12 PM

    Can you provide us with a minimalist python program that expose the problem?

  • Psycopg website
    Psycopg website created the ticket at 11:47 AM

    Submitted by: Jonathan Slenders

    Still not entirely sure whether this is a bug in psycopg2, but I think it may be.

    I have a Django project, with PostGIS setup, a...

Thursday, September 01 2011
12 [PATCH] Add isolation level for BEGIN READ ONLY was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 4:00 PM

    Hi JBQ,

    Psycopg 2.4.2 has the new set_session() method that allows you to have read only transactions. Internally it uses set default_*. See http://initd.org/p...

  • Jean-Baptiste Quenot
    Jean-Baptiste Quenot commented at 3:36 PM

    Daniele, using "set default" for readonly is a good idea. But if I make the parallel with transaction modes, I can't use "set default_transaction_isolation to S...

Tuesday, August 30 2011
68 copy_from ValueError "column list to long" was created
  • Dolf Andringa
    Dolf Andringa created the ticket at 4:05 PM

    Hi All,

    I am using psycopg2 happyly to import data from csv files from other databases into a postgres database for analysis. Today I ran into a ValueError rais...

Thursday, August 25 2011
67 RealDictCursor doesn't work with named cursors was created
  • Psycopg website
    Psycopg website created the ticket at 5:18 PM

    Submitted by: justin.vanwinkle@gmail.com

    IndexError Traceback (most recent call last)
    /home/jvanwink/repos/milosolr/loader/<ipython-input-83-e90934fd1f1e> in ()...

Monday, August 22 2011
66 Array of composite/hstore type was updated
  • Daniele Varrazzo
    • State changed from new to open
    • Tag set to array, hstore
    by Daniele Varrazzo at 3:48 PM

    Array of hstores are not supported yet. Shouldn't be terribly hard to introduce them though.

    Do you want to give it a try? Otherwise I could try to make it, but...

Monday, August 15 2011
66 Array of composite/hstore type was created
  • Sergey Shepelev
    Sergey Shepelev created the ticket at 3:05 PM
    db=> create type comp_type_test as (id uuid, f1 char(2), f2 smallint, f3 char(3), f4 char(3));
    
    >>> psycopg2.extras.register_composite('comp_type_test', connec...
Tuesday, August 09 2011
62 Need a way to remove 'bad' connections from a connection pool was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 10:39 AM

    The pool now is able to watch for the connection returned, caring to rolling back an eventual open connection or to dispose broken ones.