On 2011-11-07, Richard Huxton wrote:
> On 05/11/11 00:12, John Fabiani wrote:
> OK, so it seems psycopg is quoting your strings for you (as you'd
> expect). It's presumably turning your query into:
> ... values (E'123', $$E''$$)
> So - the $$ quoting is unnecessary here - just use the % pla
On mån, 2011-11-07 at 08:44 +, Richard Huxton wrote:
> > myvarString = "long string that contains single quotes"
> > cusor.execute("insert into table (pkid, myfield) values (%s, $$%s
> $$)",(123,
> > myvarString))
> >
> > When I execute the above I'm seeing:
> > E'long string that contains sing
On 05/11/11 00:12, John Fabiani wrote:
I'm using psycopg2.
OK - bear in mind, I'm not a Python user.
This is what I'm doing from python
myvarString = "long string that contains single quotes"
cusor.execute("insert into table (pkid, myfield) values (%s, $$%s$$)",(123,
myvarString))
When I exe
On Friday, November 04, 2011 11:06:37 am Richard Huxton wrote:
> On 04/11/11 15:26, John Fabiani wrote:
> > On Friday, November 04, 2011 07:38:29 am John Fabiani wrote:
> >> Hi,
> >> I just discovered that I can use $$string$$ to account for the problem
> >> of single quotes in the string (or other
On 04/11/11 15:26, John Fabiani wrote:
On Friday, November 04, 2011 07:38:29 am John Fabiani wrote:
Hi,
I just discovered that I can use $$string$$ to account for the problem of
single quotes in the string (or other strange char's). However, I noticed
that the table field contained E'string'.
On Friday, November 04, 2011 09:05:19 am David Johnston wrote:
> On Nov 4, 2011, at 11:26, John Fabiani wrote:
> > On Friday, November 04, 2011 07:38:29 am John Fabiani wrote:
> >> Hi,
> >> I just discovered that I can use $$string$$ to account for the problem
> >> of single quotes in the string (
On Nov 4, 2011, at 11:26, John Fabiani wrote:
> On Friday, November 04, 2011 07:38:29 am John Fabiani wrote:
>> Hi,
>> I just discovered that I can use $$string$$ to account for the problem of
>> single quotes in the string (or other strange char's). However, I noticed
>> that the table field co
On Friday, November 04, 2011 07:38:29 am John Fabiani wrote:
> Hi,
> I just discovered that I can use $$string$$ to account for the problem of
> single quotes in the string (or other strange char's). However, I noticed
> that the table field contained E'string'. I actually tried to find info on
>
John Fabiani writes:
> I just discovered that I can use $$string$$ to account for the problem of
> single quotes in the string (or other strange char's). However, I noticed
> that the table field contained E'string'. I actually tried to find info on
> this but I did not find anything.
> Co
On Fri, Nov 4, 2011 at 7:38 AM, John Fabiani wrote:
> Hi,
> I just discovered that I can use $$string$$ to account for the problem of
> single quotes in the string (or other strange char's). However, I noticed
> that the table field contained E'string'. I actually tried to find info on
> this bu
Hi,
I just discovered that I can use $$string$$ to account for the problem of
single quotes in the string (or other strange char's). However, I noticed
that the table field contained E'string'. I actually tried to find info on
this but I did not find anything.
Could someone explain what it
11 matches
Mail list logo