Problem with strange chars in text filed.

From: Bruce <okbishop(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Problem with strange chars in text filed.
Date: 2014-06-09 16:02:04
Message-ID: CADzTWJnJ-sq9G56ev85q2NZAFVja8sZw645uxONPymqXO_EgBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a table:
create table truck (name varchar(45),address varchar(150));

doing an insert:
for i in range (0,10):
meme = fake.name()
address = fake.address()
print (meme,address)
cur.execute("INSERT INTO TRUCK2 VALUES (%s, %s)", ([meme], [address]))
conn.commit()

Heres what the data looks like:

xcv=# select * from truck2;
name | address
-----------------------+------------------------------------
{"Hana Mosciski"} | {"9597 Rosalia Rue +
| South Rossie, AS 22326"}
{"Paisley Miller"} | {"588 Lorin Vista +
| Merlinville, NY 79007"}

Whats up with the {" on each line.

Help

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2014-06-09 16:07:35 Re: Problem with strange chars in text filed.
Previous Message David G Johnston 2014-06-09 13:36:13 Re: Parameterized Query