X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1C46B528B8; Tue, 17 May 2005 15:27:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78714-04; Tue, 17 May 2005 18:27:15 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 35B5152829; Tue, 17 May 2005 15:27:14 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 17 May 2005 13:27:12 -0500 Subject: Re: ERROR: unterminated quoted string... help From: Scott Marlowe To: Postgres Admin Cc: pgsql-php@postgresql.org, Sql-Postgre In-Reply-To: <428A34D9.5000700@productivitymedia.com> References: <20050517170636.GC12405@phlogiston.dyndns.org> <428A2E81.2060501@pobox.com> <428A34D9.5000700@productivitymedia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-Id: <1116354432.22291.136.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 17 May 2005 13:27:12 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/138 X-Sequence-Number: 21451 On Tue, 2005-05-17 at 13:15, Postgres Admin wrote: > Hi >=20 > I'm trying to insert encrypted data into the database and I'm noticing=20 > error dealing with quotes. Below is the error print out... >=20 > suggestions and/or at least point me in the direction to find a solution, >=20 > Thanks, > J >=20 >=20 >=20 > INSERT INTO sample.users (user_name, first_name) VALUES=20 > ('jokers', '=3D=C3=AF=C2=B5=06iF=17!=C2=B66(=C3=96=C5=B8=C3=A3=C2=BE=C3= =B3=7F=CB=86=08=C3=8C=E2=80=98'-Iw=E2=80=B0iD=C3=96iJ=C3=90=C3=BF=E2=80=A0 = %') >=20 > Warning: pg_query() [function.pg-query]: Query failed: ERROR:=20 > unterminated quoted string at or near "'=3D=C3=AF=C2=B5=06i" at character= 68 in=20 > /usr/local/apache2/htdocs/php/5/Theirry_DB.php on line 162 Use a bytea field and use pg_escape_bytea() to prepare the data for insertion.