Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 45439475AE4 for ; Tue, 15 Oct 2002 06:11:49 -0400 (EDT) Received: from mailstore-1.mail.knowledge.com (frida.london.knowtion.net [213.170.2.69]) by postgresql.org (Postfix) with ESMTP id A2195475843 for ; Tue, 15 Oct 2002 06:11:48 -0400 (EDT) Received: from [213.155.153.61] (helo=petergalbavydes) by mailstore-1.mail.knowledge.com with asmtp (Exim 3.33 #1) id 181Ofz-00018a-00; Tue, 15 Oct 2002 11:11:47 +0100 Message-ID: <001901c27432$efda8ea0$4528a8c0@cblan.mblox.com> From: "Peter Galbavy" To: "Peter Galbavy" , References: <000901c27431$e02a8e20$4528a8c0@cblan.mblox.com> Subject: Re: IGNORE ME how do i insert an empty string ? Date: Tue, 15 Oct 2002 11:09:23 +0100 Organization: Knowtion Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/158 X-Sequence-Number: 9875 Please ignore me for now. The string is NOT empty, but full of NUL characters. My bad for not using 'less' to view the output... Peter ----- Original Message ----- From: "Peter Galbavy" To: Sent: Tuesday, October 15, 2002 11:01 AM Subject: [SQL] how do i insert an empty string ? > FAQ: A search yielded nothing explicit... > > I have an INSERT statement: > > INSERT INTO metadata (md5, origin, name, value) > VALUES ('fd859f263bd0579935f2146a22d24f32', 'EXIF', > 'UserComment', '') > > but this fails (using Perl DBI, DBD::Pg) because $dbh->quote() returns two > single quotes, which fails because something along the way thinks this is a > single quote. I do NOT want to insert a NULL but an empty string... > > (This is either doing a $dbh->do(...) or a prepare ... execute without > $dbh->quote()) > > Peter > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >