This project is archived and is in readonly mode.
Activity (RSS)
Tuesday, January 14 2014
-
Federico Di Gregorio commented@extesy, yes, I forgot that the result is a tuple even when you select just one column. See my edited answer.
-
Oleg Anashkin commenteddeleted
-
Oleg Anashkin edited a commentdeleted
-
Oleg Anashkin commentedOk, 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 edited a commentOk, 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 ...
-
Federico Di Gregorio commentedThat's just how Python formats a dictionary in a "print". If you try to access it you'll see that it is a perfectly valid:
record = cur.fetchone() print record... -
Federico Di Gregorio edited a commentThat's just how Python formats a dictionary in a "print". If you try to access it you'll see that it is a perfectly valid:
record = cur.fetchone() print record... -
Oleg Anashkin commentedAnd here is repro using python:
import psycopg2 conn = psycopg2.connect(database='ebooktracker') cur = conn.cursor() cur.execute("select properties from book ... -
Oleg Anashkin commentedSorry, fixed formatting:
ebooktracker=# \d+ book; Table "public.book" Column | ... -
Oleg Anashkin commentedI'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... -
Daniele Varrazzo commentedI'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. ...
-
Oleg Anashkin commentedI'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. W...
-
Daniele Varrazzo commentedPsycopg 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... -
Oleg Anashkin commentedSorry, somehow bug post got screwed up. What I meant is this: {'Url': 'blablabla'} - uses single quotes.
-
Psycopg website created the ticketSubmitted by: Oleg Anashkin
For columns with type json, psycopg returns string with single quotes, like this:
{'Url': 'http://www.amazon.com'}
This is inval...
Tuesday, January 07 2014
Monday, December 30 2013
Tuesday, December 24 2013
Monday, December 09 2013
Wednesday, November 27 2013
-
Voicu edited a commentHmm, I tested what happens when doing psycopg2.extensions.cursor(<not a conn object>) and the result is weird - the cursor object is created and it lets you do ...
-
Voicu edited a commentHmm, I tested what happens when doing psycopg2.extensions.cursor(<not a conn object>) and the result is weird - the cursor object is created and it lets you do ...
-
- State changed from new to open
Thank you for the report. Args should be parsed using
O!instead ofO. Seecursor_init()for an example.