Re: escaping arrays in perl dbi

From: Andrew Perrin <aperrin(at)email(dot)unc(dot)edu>
To: Vincent Stoessel <vincent(at)xaymaca(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: escaping arrays in perl dbi
Date: 2002-05-09 14:44:50
Message-ID: Pine.LNX.4.21L1.0205091043480.15497-100000@perrin.socsci.unc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

It's not the curly brackets but the double quotes - when you hit the
opening " of "apple" it matches the original " of the string. Try:

$dbh->do(q{update basket set f_order='{"apple",0}' where cap='I'});

ap

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin(at)unc(dot)edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA

On Thu, 9 May 2002, Vincent Stoessel wrote:

> Hello All,
> I am trying to figure out how I need to change the string below in
> order to do an insert into my table using perl dbi. perl seems to choke
> on the curly brackets. Any help would be appriciated.
> Thanks.
>
>
> $dbh->do("update basket set f_order ='{"apple",0}' where cap ='I'");
>
>
> --
> Vincent Stoessel
> Linux Systems Developer
> vincent xaymaca.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dave Carrigan 2002-05-09 15:28:43 Re: escaping arrays in perl dbi
Previous Message Heiko 2002-05-09 14:37:31 Bad time external representation ''