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.

Daniele Varrazzo's latest activity

Thursday, February 06 2014
192 enhancement: connection.closed attribute to actually become a property that d... was updated in psycopg
  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 2:05 PM

    I would say no: users of that property don't expect an extra query to be performed to check the connection is still up. For one, it would become a blocking oper...

Monday, February 03 2014
191 Add __repr__ to Json object for better logging was updated in psycopg
  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 11:26 PM

    As per discussion on github, Json.__str__ should return getquoted() as many adapters already do. Also note:

    1) other adapters should be checked too (range?)
    2) ...

Tuesday, January 14 2014
190 Invalid json is returned for json column type was updated in psycopg
  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 6:39 PM

    Added a FAQ entry and a note in the JSON docs. Closing the bug.

  • Daniele Varrazzo
    Daniele Varrazzo commented at 6:01 PM

    Well, even less, only register_default_json() exist :) That's because I've expected people wanting to customize the way it is parsed more often than with other ...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 5:26 PM

    @fog: I was going to give Oleg your suggestion, and I just realized that psycopg2.extras.register_default_json(loads=lambda x: x) works as well but is much more...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 5:22 PM

    Yes. The easiest is:

    >>> psycopg2.extras.register_default_json(loads=lambda x: x)
    >>> cur.execute("select %s::json", [Json({u'Url': u'€'})])
    >>> cur.fetchone()...
  • Daniele Varrazzo
    Daniele Varrazzo commented at 3:38 PM

    I'm using psycopg through https://github.com/coleifer/peewee ORM, but it doesn't mess with the data. The column in question is defined as a simple text field. ...

1 earlier change…
  • Daniele Varrazzo
    Daniele Varrazzo commented at 11:15 AM

    Psycopg only forwards what received by postgres. How are you generating this data?

    From a quick test postgres can't generate "wrong" data:

    piro=# select '{''Ur...
Tuesday, January 07 2014
188 assertion failed in pqpath.c was updated in psycopg
  • Daniele Varrazzo
    Daniele Varrazzo commented at 5:12 PM

    A script to reproduce the issue would be preferred. A patch to fix the issue would be even better accepted, above all if checking the issue implies recompiling ...

189 execute & mogrify don't fail with no format placeholder but with arguments given was updated in psycopg
  • Daniele Varrazzo
    • Milestone set to psycopg3
    by Daniele Varrazzo at 5:02 PM

    About problem 1: if the query contains no placeholder I'd argue it should also allow an empty list as argument (it is a sequence with the same number of item as...