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.

Oleg Anashkin's latest activity

Monday, February 03 2014
191 Add __repr__ to Json object for better logging was created in psycopg
  • Oleg Anashkin
    Oleg Anashkin created the ticket at 4:19 AM

    Currently, attempt to log or print Json object uses default python's implementation which is useless. Using actual serialized content is much better.

    I have sen...

Tuesday, January 14 2014
190 Invalid json is returned for json column type was updated in psycopg
  • Oleg Anashkin
    Oleg Anashkin commented at 7:07 PM

    Thank you guys for your quick responses and for helping with this issue.

  • Oleg Anashkin
    Oleg Anashkin commented at 4:55 PM

    I peeked into psycopg's code and found that inside register_json it always creates typecasters to perform loads/dumps on the column data, therefore unpacking th...

  • Oleg Anashkin
    Oleg Anashkin commented at 4:48 PM

    deleted

  • Oleg Anashkin
    Oleg Anashkin edited a comment at 4:48 PM

    deleted

  • Oleg Anashkin
    Oleg Anashkin commented at 4:03 PM

    Ok, so as I understand the problem is that the json record is actually eval'd by psycopg instead of being converted to text, right? Similar to what Daniele was ...

4 earlier changes…
  • Oleg Anashkin
    Oleg Anashkin edited a comment at 4:04 PM

    Ok, so as I understand the problem is that the json record is actually eval'd by psycopg instead of being converted to text, right? Similar to what Daniele was ...

  • Oleg Anashkin
    Oleg Anashkin commented at 3:50 PM

    And here is repro using python:

    import psycopg2
    
    conn = psycopg2.connect(database='ebooktracker')
    cur = conn.cursor()
    cur.execute("select properties from book ...
  • Oleg Anashkin
    Oleg Anashkin commented at 3:45 PM

    Sorry, fixed formatting:

    ebooktracker=# \d+ book;
                                                                  Table "public.book"
          Column       |       ...
  • Oleg Anashkin
    Oleg Anashkin commented at 3:45 PM

    I'm sorry, but this is json and I got it from postgres. Attaching screenshot. Column type is json. Here is the table schema:

    ebooktracker=# \d+ book;
    Table "pub...