Received: from cap-ferrat.albourne.com (cap-ferrat.albourne.com [195.212.0.35]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0PAWLq46882 for ; Thu, 25 Jan 2001 05:32:22 -0500 (EST) (envelope-from alessio@albourne.com) Received: from albourne.com (akamas.albourne.com [195.212.241.254]) by cap-ferrat.albourne.com (8.9.3/8.9.3/Albourne/UKS/2.10/MAPS) with ESMTP id KAA18316; Thu, 25 Jan 2001 10:32:10 GMT Message-ID: <3A700060.3FD31A6D@albourne.com> Date: Thu, 25 Jan 2001 12:30:56 +0200 From: Alessio Bragadini Organization: APL Financial Services (Overseas) Ltd. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.18pre21 i686) X-Accept-Language: it, en, sv MIME-Version: 1.0 To: Markus Wagner CC: "pgsql-sql@postgresql.org" Subject: Re: "'" in SQL INSERT statement References: <3A6FFC12.F5ABA71@imsd.uni-mainz.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/352 X-Sequence-Number: 1025 Markus Wagner wrote: > I have some data that I wish to transfer into a database using perl/DBI. If you use Perl DBI you should issue statements like $dbh->do ('INSERT INTO table (field1, field2) VALUES (?,?)', undef, $value1, $value2); This binding takes care of quoting and escapes all characters that may cause problems in the database backed (e.g. "that's" becomes "that''s" etc.) There is a DBI mailing list where you can find more info and support: see -- Alessio F. Bragadini alessio@albourne.com APL Financial Services http://village.albourne.com Nicosia, Cyprus phone: +357-2-755750 "It is more complicated than you think" -- The Eighth Networking Truth from RFC 1925