X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A0290D7E2E for ; Wed, 12 Oct 2005 14:10:52 -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 71291-06 for ; Wed, 12 Oct 2005 17:10:49 +0000 (GMT) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.198]) by svr1.postgresql.org (Postfix) with ESMTP id C4E27D7E0B for ; Wed, 12 Oct 2005 14:10:49 -0300 (ADT) Received: by qproxy.gmail.com with SMTP id e12so267305qbe for ; Wed, 12 Oct 2005 10:10:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HAH9C5MpbQhnw7LIkaHxY4X+6DgoJCbg3sXDkrYaAQiJkSRW4XdRxlMUwcMQNxL0TlnDsQbQgjReulKUVxpPnBbL1O746+aYcFM+9uHpJz2XS2XnOLQajXfuggJl/Gv7UxhKXEZ/VGw8mp7qJc+4t6UHBKnXV361mahAIM2yt/Y= Received: by 10.65.105.2 with SMTP id h2mr217348qbm; Wed, 12 Oct 2005 10:08:29 -0700 (PDT) Received: by 10.65.115.7 with HTTP; Wed, 12 Oct 2005 10:08:28 -0700 (PDT) Message-ID: <7104a7370510121008h198d5013vdd29c30394984855@mail.gmail.com> Date: Wed, 12 Oct 2005 20:08:29 +0300 From: Volkan YAZICI To: Christopher Kings-Lynne Subject: Re: Automatically opening pdf files stored in a bytea field Cc: Adam Witney , pgsql-php In-Reply-To: <434C66E0.8060801@familyhealth.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <434C66E0.8060801@familyhealth.com.au> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.555 required=5 tests=[AWL=0.531, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200510/22 X-Sequence-Number: 3290 Hi, On 10/12/05, Christopher Kings-Lynne wrote: > I'm not 100% sure you need the pg_unescape_bytea - I thought that was > already done automatically? Yep, I agree. Furthermore, (un)escape routines will consume so much system CPU. If you can, try to use parameters (pg_query_params() and pg_send_params()) in any bytea/lo storage. This makes you free from escaping without any potential SQL Injection threats. Regards.