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

Tuesday, May 03 2011
52 Can't adapt type 'Decimal' was updated in psycopg
  • Daniele Varrazzo
    • Tag set to adapt, decimal
    by Daniele Varrazzo at 11:35 PM

    The same bug was reported for mod_python a few years ago and was fixed, so I don't know why it's bugging again - or it is something similar.

    The problem is that...

51 TypeError: can't escape unicode to binary: writing unicode into bytea was updated in psycopg
  • Daniele Varrazzo
    • Tag set to binary, unicode
    • State changed from new to invalid
    by Daniele Varrazzo at 11:02 PM

    No, it's not reasonable for unicode to be interpreted as a binary string. This is the entire point for which there are separate unicode and string object (or st...

Sunday, April 10 2011
50 Codec error with psycopg 2.4 and django 1.3 was updated in psycopg
Tuesday, April 05 2011
49 to_timestamp not working in 2.4 was updated in psycopg
  • Daniele Varrazzo
    Daniele Varrazzo commented at 7:46 AM

    No the behavior is perfectly known and we consider it correct. When you pass a date object to psycopg it creates a postgres date, not an unknown literal, by add...

Sunday, April 03 2011
49 to_timestamp not working in 2.4 was updated in psycopg
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 11:06 PM

    PostgreSQL is now (since before 2.4) more strict about types. You are passing a Python date to psycopg, so psycopg is passing a date to postgres. There is no fu...

Monday, March 28 2011
48 Interface error: decoding empty BYTEA was updated in psycopg
  • Daniele Varrazzo
    Daniele Varrazzo commented at 1:13 PM

    By the way, your analysis was correct: the check str[0] is wrong when len == 0.

    The libpq allocates at least one byte to avoid a non portable malloc(0). I was i...

Saturday, March 26 2011
47 Can only specify static-libpq in setup.cfg was updated in psycopg
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 1:42 PM

    I'm merging the patch. However for me (on ubuntu) the compiled library doesn't work:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ...
48 Interface error: decoding empty BYTEA was updated in psycopg
  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 1:22 PM

    Just pushed our own bytea hex parser, there is no more need of a specific libpq version on the client.

    I've added a specific test for '\x' to be parsed correctl...

Wednesday, March 16 2011
48 Interface error: decoding empty BYTEA was updated in psycopg
  • Daniele Varrazzo
    Daniele Varrazzo commented at 4:36 PM

    Thank you for the patch, but I think a safer approach would be to ditch entirely the libpq unescape and deal with the hex format ourselves - it is an easy to pa...

  • Daniele Varrazzo
    • Tag changed from rel-2.4 to bytea, rel-2.4
    by Daniele Varrazzo at 3:04 PM

    I don't think the libpq can retain data across different invocations of a python process: its state should be cleaned when the process terminates.

    It still smel...