From: Volkan YAZICI <volkan.yazici@gmail.com>
To: pgsql-php@postgresql.org
Subject: Re: ERROR: unterminated quoted string... help
Date: Wed, 18 May 2005 11:35:00 +0300
Message-ID: <7104a73705051801355a0075a2@mail.gmail.com> (raw)
In-Reply-To: <428A34D9.5000700@productivitymedia.com>
References: <DCD4903594CCF34CAFE200BDF3448D8D5B291A@tshuscodenmbx01.ERF.THOMSON.COM>
<20050517170636.GC12405@phlogiston.dyndns.org>
<428A2E81.2060501@pobox.com>
<428A34D9.5000700@productivitymedia.com>
Hi,
On 5/17/05, Postgres Admin <postgres@productivitymedia.com> wrote:
> I'm trying to insert encrypted data into the database and I'm noticing
> error dealing with quotes. Below is the error print out...
>
> suggestions and/or at least point me in the direction to find a solution,
>
> INSERT INTO sample.users (user_name, first_name) VALUES
> ('jokers', '=ïµiF!¶6(ÖŸã¾óˆÌ''-Iw‰iDÖiJÐÿ† %')
If you don't use parameters, you need to escape the data to place in
an SQL query command. But this may cost so much on the CPU and RAM
side if your will be escaped data is enough long to exhaust other
processes. (For example, it's not so feasible to unescape a media file
while inserting.)
At the moment, current stable releases of PHP doesn't support
parameter usage, but it was committed to CVS in revision 1.315. If
you'll need these kind of escape functions so much, I'd encourage you
to patch your php/ext/pgsql/pgsql.c with the one in CVS tree. After
patch, you'll be able to use pg_query_params, pg_prepare, pg_execute,
pg_send_query_params and pg_send_prepare; namely, every possible
parameter supported function.
Regards.
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: volkan.yazici@gmail.com, pgsql-php@postgresql.org
Subject: Re: ERROR: unterminated quoted string... help
In-Reply-To: <7104a73705051801355a0075a2@mail.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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox