agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Problem with strange chars in text filed.
Date: Mon, 09 Jun 2014 10:07:35 -0600
Message-ID: <5395DBC7.9050506@gmail.com> (raw)
In-Reply-To: <CADzTWJnJ-sq9G56ev85q2NZAFVja8sZw645uxONPymqXO_EgBQ@mail.gmail.com>
References: <CADzTWJnJ-sq9G56ev85q2NZAFVja8sZw645uxONPymqXO_EgBQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

On 06/09/2014 10:02 AM, Bruce wrote:
> 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 <http://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
>
What's up with the '[' deref. in the execute?

view thread (5+ messages)  latest in thread

Message-ID: <5395DBC7.9050506@gmail.com>
Permalink:  ../5395DBC7.9050506@gmail.com/
Also on:    postgresql.org/message-id/5395DBC7.9050506@gmail.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: Problem with strange chars in text filed.
  In-Reply-To: <5395DBC7.9050506@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox