Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1C7F16321EE for ; Mon, 5 Jul 2010 03:35:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 76435-02 for ; Mon, 5 Jul 2010 06:35:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gw0-f46.google.com (mail-gw0-f46.google.com [74.125.83.46]) by mail.postgresql.org (Postfix) with ESMTP id 79126632E99 for ; Mon, 5 Jul 2010 03:35:34 -0300 (ADT) Received: by gwj21 with SMTP id 21so601212gwj.19 for ; Sun, 04 Jul 2010 23:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=6xaoNh7ZRlHUFUMIS9w51Rv/T5H/qqY4JdwGIul7d/o=; b=xEv/9ydat/0B7Tsi4z5gtE6h3je6H3mUf/q9WYUh/Lz5gFl2FpI3EUO8uYqvbjoj7+ PzdQwcZhpQJpJtTmurJFDuJ51WmMOIY0RhSfShsqaqTQi3SVERzJjh66oEIN5gLFsq18 YEydDRbtCxt+nPWtUECxVjW+bzA4G2loto9Cs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=wkIGfCzCkDI3iYT60fJTZtbRLFFm5E7RJiNinF6KxkkshCmUgx99svsHbIeVDxIsJI V2cd8wRqC0noyiFsnNhSMLBw6bKiKZQotpk2uwCL1QECG1Rb2uLQeZ4iDQ+aC/dxgokR 3O98TkqOaIuqv05e3jwNKsJJHr/lK33cbATZU= Received: by 10.100.122.10 with SMTP id u10mr3204673anc.21.1278311733285; Sun, 04 Jul 2010 23:35:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.98.3 with HTTP; Sun, 4 Jul 2010 23:35:13 -0700 (PDT) In-Reply-To: References: <4C3177B8.3080803@bankir.ru> From: Pavel Stehule Date: Mon, 5 Jul 2010 08:35:13 +0200 Message-ID: Subject: Re: To: Trinath Somanchi Cc: silly sad , pgsql-sql@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_40=-0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/9 X-Sequence-Number: 34322 Hello use a LO interface http://www.postgresql.org/docs/8.4/static/lo-interfaces.html exact form depends on language that you are use. Regards Pavel Stehule 2010/7/5 Trinath Somanchi : > Hi, > > I'm new in using BLOB. How will the insert for storing very large byte > strings into a column=C2=A0 of data type Blob. > > On Mon, Jul 5, 2010 at 11:42 AM, silly sad wrote: >> >> On 07/05/10 09:57, =C2=A0wrote: >>> >>> Hi, >>> >>> How can I store Byte strings into a postgresql database. >>> Is there any special command to store it. How will be the sql query. >> >> there is only '\0' byte incapable to input-output. >> so u have to have it escaped at all costs _AND NOTHING MORE_. >> >> "escaped" doesn't mean "prefixed with backslash" >> ("backslash method" cause a zero-byte to pass SQL parser an to be actual= ly >> stored, BUT >> the output will be corrupted, because of this zero-byte will be actually >> output) >> >> You may use the BYTEA type >> (similar to the TEXT but with different input-output) which effectively >> escapes zero-byte and a lot of other completely harmless bytes as well >> (probably to reach a better overhead) >> >> Or you may introduce a pair of your own escape rules. >> >> Unfortunately there are no way to influence The Pg Developers to get rid >> of the nasty god damned CSTRING off the input/output operations. >> >> >> -- >> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-sql > > > > -- > Regards, > ---------------------------------------------- > Trinath Somanchi, >