X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A89CA475E82 for ; Fri, 4 Apr 2003 02:44:57 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 592AF475CEE for ; Fri, 4 Apr 2003 02:44:53 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Fri Apr 04 09:44:52 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id JAA03361; Fri, 4 Apr 2003 09:44:51 +0200 (METDST) Message-ID: <3E8D37F3.70006@rodos.fzk.de> Date: Fri, 04 Apr 2003 09:44:51 +0200 From: Christoph Haller User-Agent: Mozilla/5.0 (X11; U; HP-UX 9000/780; en-US; rv:1.3) Gecko/20030321 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Cc: frankie@ucr.com.hk Subject: Re: Segmentation Fault Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-12.1 required=5.0 tests=BAYES_10,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/26 X-Sequence-Number: 3965 > > > > The doc says: > > If you want to include strings that have been received from a source > > that is not trustworthy (for example, because a random user entered > > them), you cannot directly include them in SQL queries for security > > reasons. Instead, you have to quote special characters that are > > otherwise interpreted by the SQL parser. > > hmm.., I did this on purpose. Because I want to grab SQL commands > I previously stored in a table from one database, then reformat them > and store them into another database. > E.g. the reformatted string looks like: > INSERT INTO tableOnAnotherDB(sqlCMD) values('delete from test where > name=''\\\\'''); > Ok, I see. I didn't think of that possibility. You are right. Regards, Christoph