From: | Jon Jensen <jon(at)endpoint(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: massive quotes? |
Date: | 2003-09-11 11:31:21 |
Message-ID: | Pine.LNX.4.50.0309111129350.1831-100000@louche.swelter.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 10 Sep 2003, Doug McNaught wrote:
> But Perl/DBI does escaping for you, so all you'd have to do is:
>
> $sth = $dbh->prepare
> ("CREATE FUNCTION foo(x text) RETURNS text AS ? LANGUAGE 'plpgsql'");
> $sth->execute($function_body);
>
> where $function_body is the unescaped form of the function. So
> there's no need for a COPY-style mechanism, you can use the current
> CREATE FUNCTION syntax without having to escape everything yourself.
Right; I'm not saying there's no reasonable way to deal with it in DBI
right now. I think the biggest benefit to a block-string quoting mechanism
is for scripts to feed to psql, but would prefer having a consistent SQL
solution that I could use when desired in libpq/DBI for times I build the
entire SQL statement in a string and call it with do().
Jon
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2003-09-11 12:12:46 | Re: Another small bug (pg_autovacuum) |
Previous Message | Andreas Pflug | 2003-09-11 09:40:44 | Re: massive quotes? |