From trinath.somanchi@gmail.com Mon Jul 5 05:57:51 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 72A9863287B for ; Mon, 5 Jul 2010 02:57:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 54610-07 for ; Mon, 5 Jul 2010 05:57:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f174.google.com (mail-px0-f174.google.com [209.85.212.174]) by mail.postgresql.org (Postfix) with ESMTP id 8FAB2632672 for ; Mon, 5 Jul 2010 02:57:43 -0300 (ADT) Received: by pxi14 with SMTP id 14so1552041pxi.19 for ; Sun, 04 Jul 2010 22:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=5pmineVftqkcIvL/K0Sguz95WLo3SteyZZcmrdDwpLw=; b=gUL2tHNHKnfkDjI7mrz73oGVt2Fd/9eCy6xY12DERcbwuvtFThjIxJ+nbrlyYyuMyq zmXcjr1rUbyOLy4VPqakb3sg/f8XlIqxNyYHzFkNCruyjYlksq8mIMuTByexh74UZf4a Jw7VNEbH4XMeO8UgHYDEGJKSTMPsTOiNKLdwY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=V0UGvzL8JX4LHT50+SWowYYQ1o3kEEEU/h9n1G/O8COMvliLXN/rHjPTi7SenKIVh6 uQ0yHk+DtS9SAwvSddmGwAPAMWxC2Q3oKnTV7kgRR8ulOhBwHPVpL8wUjfOAaCaWazug xzt1/LSV2RJC0gWyJUCesBUyjF8Zf7lbEOSho= MIME-Version: 1.0 Received: by 10.142.233.10 with SMTP id f10mr2800928wfh.280.1278309461755; Sun, 04 Jul 2010 22:57:41 -0700 (PDT) Received: by 10.142.253.13 with HTTP; Sun, 4 Jul 2010 22:57:41 -0700 (PDT) Date: Mon, 5 Jul 2010 11:27:41 +0530 Message-ID: Subject: How to store Byte strings into a table. From: Trinath Somanchi To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd2e0546188bf048a9d9db4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/6 X-Sequence-Number: 34319 --000e0cd2e0546188bf048a9d9db4 Content-Type: text/plain; charset=UTF-8 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. I have gone through this http://www.postgresql.org/docs/8.4/static/datatype-binary.html but have not seen any example for how to insert data into such a field. Please help me in this regard. -- Regards, ---------------------------------------------- Trinath Somanchi, --000e0cd2e0546188bf048a9d9db4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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.
I have gone through this http://www.postgresql.org/docs/8.4/static/dataty= pe-binary.html but have not seen any example for how to insert data int= o such a field.

Please help me in this regard.


--
Regards,=
----------------------------------------------
Trinath Somanchi,
--000e0cd2e0546188bf048a9d9db4-- From sad@bankir.ru Mon Jul 5 06:12:21 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0EC9F6325DA for ; Mon, 5 Jul 2010 03:12:21 -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 17657-06 for ; Mon, 5 Jul 2010 06:12:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 2801D632C87 for ; Mon, 5 Jul 2010 03:12:12 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OVeuX-00075M-Mm for pgsql-sql@postgresql.org; Mon, 05 Jul 2010 10:12:09 +0400 Received: from [192.168.1.6] [178.34.185.189] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 1F3B50; Mon, 5 Jul 2010 10:12:09 +0400 Message-ID: <4C3177B8.3080803@bankir.ru> Date: Mon, 05 Jul 2010 10:12:08 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/7 X-Sequence-Number: 34320 On 07/05/10 09:57, wrote: > 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 actually 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. From trinath.somanchi@gmail.com Mon Jul 5 06:32:06 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id ED7F96321EE for ; Mon, 5 Jul 2010 03:32:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 45960-02 for ; Mon, 5 Jul 2010 06:31:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f174.google.com (mail-px0-f174.google.com [209.85.212.174]) by mail.postgresql.org (Postfix) with ESMTP id 4F27163320A for ; Mon, 5 Jul 2010 03:31:59 -0300 (ADT) Received: by pxi14 with SMTP id 14so1560912pxi.19 for ; Sun, 04 Jul 2010 23:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=NbrgyDIEU8Ayq1QrGcnnu5iFLjAAqNWxrUJ4RzxBn90=; b=Re2JEVp73lNUA/FxNAm1Ia6uFuGtl4ez1G1oVUIP3pQWZzfIMUjQUj4Qxmp3tteA9L NEHIUmMceNG0ZcM27NHnVf2IhpyDkvztbiEFyP/NkLznH1zQ4uQlEc06ZmBK/kyxALaR b+PXuOMHEXM74mFlCrz3LYhOq74JSmNmE+yLc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=YBxJt5Boibazc7oyLIGVgmXnUzXAkEdWmUXlK1RmXWXgtwZwfA5uvoWAuyT1gGz519 0Yx9rzOcd2gRJJcacubqN66sPyLXXOSpL0xGKQ5U7dkI6KtNwnRopIaFqUCYKpRY1geK frB016Jwe7OOeHZlH0lYz+KUmPe2fxcjRVuxo= MIME-Version: 1.0 Received: by 10.142.172.3 with SMTP id u3mr2842776wfe.278.1278311415607; Sun, 04 Jul 2010 23:30:15 -0700 (PDT) Received: by 10.142.253.13 with HTTP; Sun, 4 Jul 2010 23:30:15 -0700 (PDT) In-Reply-To: <4C3177B8.3080803@bankir.ru> References: <4C3177B8.3080803@bankir.ru> Date: Mon, 5 Jul 2010 12:00:15 +0530 Message-ID: Subject: Re: From: Trinath Somanchi To: silly sad Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd2df4cd6f872048a9e11bc X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=-5 required=5 tests=BAYES_40=-0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/8 X-Sequence-Number: 34321 --000e0cd2df4cd6f872048a9e11bc Content-Type: text/plain; charset=UTF-8 Hi, I'm new in using BLOB. How will the insert for storing very large byte strings into a column of data type Blob. On Mon, Jul 5, 2010 at 11:42 AM, silly sad wrote: > On 07/05/10 09:57, wrote: > >> 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 actually > 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, --000e0cd2df4cd6f872048a9e11bc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 <sad@bankir.ru> 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= actually stored, BUT
the output will be corrupted, because of this zero-byte will be actually ou= tput)

You may use the BYTEA type
(similar to the TEXT but with different input-output) which effectively esc= apes zero-byte and a lot of other completely harmless bytes as well (probab= ly 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,
--000e0cd2df4cd6f872048a9e11bc-- From pavel.stehule@gmail.com Mon Jul 5 06:35:42 2010 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, > From sad@bankir.ru Mon Jul 5 06:37:00 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 8407B632FCE for ; Mon, 5 Jul 2010 03:37:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 00694-05 for ; Mon, 5 Jul 2010 06:36:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 153CB632E99 for ; Mon, 5 Jul 2010 03:36:53 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OVfIR-0003UN-98 for pgsql-sql@postgresql.org; Mon, 05 Jul 2010 10:36:51 +0400 Received: from [192.168.1.6] [178.34.185.189] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 0A406E; Mon, 5 Jul 2010 10:36:51 +0400 Message-ID: <4C317D82.7020702@bankir.ru> Date: Mon, 05 Jul 2010 10:36:50 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/10 X-Sequence-Number: 34323 On 07/05/10 10:30, Trinath Somanchi wrote: > Hi, > > I'm new in using BLOB. How will the insert for storing very large byte > strings into a column of data type Blob. i didn't advice you to use BLOB. you may store a string as long as 2GB at any TEXT or BYTEA field. From pavel.stehule@gmail.com Mon Jul 5 06:43:47 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 122E9632E99 for ; Mon, 5 Jul 2010 03:43:47 -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 72742-08 for ; Mon, 5 Jul 2010 06:43:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id 22CA8632E16 for ; Mon, 5 Jul 2010 03:43:35 -0300 (ADT) Received: by gye5 with SMTP id 5so1140233gye.19 for ; Sun, 04 Jul 2010 23:43: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=OrFF6nzaFKllVvK8RmewRuqh3y5hRF28FJuE8lA4/DY=; b=V9EPNWBLpWW+Tll8jjPhmI+JD+0EyUHH4otNbJQryggXrzfsyqwNUBpRWK+T2vVrrZ 7fIcliTMqvL6VSpc+Be5uucqs9+HihfnBcFagOoZg8ux4OKpjtNMUwTqlV2YvQ+BePul XBs0+Dw1n63bsey6A/JpAOcscIsaOsRK+CCm4= 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=i7mZY16CJKWpM+2cjM+H0k615GWZ5NcS/cBI5rDBV2vxStE8zo8HzyYI+Z8eP3qjWF r91MbCjd1IwG/Y62HH5aLPDbqPlbg8yll/t3VW7t28ZRot7XZ0ENLzCH5TqmGJuXgc/z sJP9FoKke0NWkBhO0VfOlhUr1c3rgzXxahYLs= Received: by 10.90.52.14 with SMTP id z14mr2275352agz.191.1278312213524; Sun, 04 Jul 2010 23:43:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.98.3 with HTTP; Sun, 4 Jul 2010 23:43:13 -0700 (PDT) In-Reply-To: <4C317D82.7020702@bankir.ru> References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> From: Pavel Stehule Date: Mon, 5 Jul 2010 08:43:13 +0200 Message-ID: Subject: Re: To: silly sad Cc: 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_20=-0.001 X-Spam-Level: X-Archive-Number: 201007/11 X-Sequence-Number: 34324 2010/7/5 silly sad : > On 07/05/10 10:30, Trinath Somanchi wrote: >> >> Hi, >> >> I'm new in using BLOB. How will the insert for storing very large byte >> strings into a column =C2=A0of data type Blob. > > i didn't advice you to use BLOB. > > you may store a string as long as 2GB at any TEXT or BYTEA field. you can do it, but don't do it! Escaping of large strings are not cheap, processing extra long SQL statements are extreme expensive on memory - so don't do it - or test it before and check memory and processor usage - and check it in testing environment with more than one user. The good size for text or bytea is less than 100M and real max isn't 2G but it is 1G. LO isn't these limits because it isn't accessable on SQL level. Regards Pavel Stehule > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > From gray.ru@gmail.com Mon Jul 5 06:46:14 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B9DBD632E16 for ; Mon, 5 Jul 2010 03:46:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 03102-03 for ; Mon, 5 Jul 2010 06:46:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mail.postgresql.org (Postfix) with ESMTP id 2CF8C6321EE for ; Mon, 5 Jul 2010 03:46:06 -0300 (ADT) Received: by wwe15 with SMTP id 15so459928wwe.19 for ; Sun, 04 Jul 2010 23:46:05 -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; bh=F73IGwzM2sOhIuJeisQ4TWm2h85vb0oeIXBE8xsYjNg=; b=jDW+RAdP7mg2G40J4eGOrx7IFIzFs5JR5DN7YdRZLGPl9ZkAiXwadxyWzCgDEVzwpz fJxgUlsdneKsaLpBig9ml2/l+1ySoCLi9HhO/tqnPS7/CI5eXtntanNNeyhl4e0pqQNf cjAUAW5tnXkT9+xYPbw8prWMP7aeoINS482js= 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; b=Lk0BymeslaFr5yJnBYz13Zac8+fG8fWzF+WMNCwGA6UysGSoGEU78qlqAKTceGMKu8 AIAU60rKIcVer89jKFwZRzgXIK0lutdgT02zTCkkuZ3CpAuLf5v0gQ6wGYAApfufznAb biYhLQWEZ/yvaQVNU5Vd9fXGJVfTaAhjJrIbw= Received: by 10.227.134.2 with SMTP id h2mr2884226wbt.196.1278312365219; Sun, 04 Jul 2010 23:46:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.172.207 with HTTP; Sun, 4 Jul 2010 23:45:45 -0700 (PDT) In-Reply-To: References: From: Sergey Konoplev Date: Mon, 5 Jul 2010 10:45:45 +0400 Message-ID: Subject: Re: How to store Byte strings into a table. To: Trinath Somanchi Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/12 X-Sequence-Number: 34325 On 5 July 2010 09:57, Trinath Somanchi wrote: > 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. > > I have gone through this > http://www.postgresql.org/docs/8.4/static/datatype-binary.html but have not > seen any example for how to insert data into such a field. Use octet-escaping to form the string to put in your SQL like it described it the article you referenced. > > Please help me in this regard. > > > -- > Regards, > ---------------------------------------------- > Trinath Somanchi, > -- Sergey Konoplev Blog: http://gray-hemp.blogspot.com / Linkedin: http://ru.linkedin.com/in/grayhemp / JID/GTalk: gray.ru@gmail.com / Skype: gray-hemp / ICQ: 29353802 From sad@bankir.ru Mon Jul 5 06:56:51 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 82CA7632F70 for ; Mon, 5 Jul 2010 03:56:51 -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 76549-04 for ; Mon, 5 Jul 2010 06:56:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 76A93632BF3 for ; Mon, 5 Jul 2010 03:56:41 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OVfbb-0007b8-Nm for pgsql-sql@postgresql.org; Mon, 05 Jul 2010 10:56:39 +0400 Received: from [192.168.1.6] [178.34.185.189] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 137537; Mon, 5 Jul 2010 10:56:39 +0400 Message-ID: <4C318226.3040701@bankir.ru> Date: Mon, 05 Jul 2010 10:56:38 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/13 X-Sequence-Number: 34326 On 07/05/10 10:43, Pavel Stehule wrote: > The good size for text or bytea is less than 100M and real max isn't > 2G but it is 1G. LO isn't these limits because it isn't accessable on > SQL level. any regular file on my filesystem isn't accessible on SQL level. i am happy with them and never tried to store at a database. From pavel.stehule@gmail.com Mon Jul 5 07:03:39 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9569E63320A for ; Mon, 5 Jul 2010 04:03:39 -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 15767-07 for ; Mon, 5 Jul 2010 07:03:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f174.google.com (mail-gx0-f174.google.com [209.85.161.174]) by mail.postgresql.org (Postfix) with ESMTP id 2ADDF6330C9 for ; Mon, 5 Jul 2010 04:03:32 -0300 (ADT) Received: by gxk23 with SMTP id 23so2377552gxk.19 for ; Mon, 05 Jul 2010 00:03:31 -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; bh=58DLXt6TjqyCt6tGcpPaWLPsPmbNYycWul0NgM1ygdU=; b=AqLTnZY50Qgb2Zpvler7cCCRPslXisMldMXsisPaLZ6JB8cIQdDO76hUKPauoI5YBW sXfr4fLws5wXvvmcrxyaaVWBBE9mNCzuR9vERPE348T6jgwU6GrKYxZbGLD65bvDqc9y eVdVvw9dLTKKxE6kD6IcAWc777DwelUFGUh+0= 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; b=TxZya5G36Mk5LM9qg4DZpkiHKFN2n4AqSeSwepdsVZaaIr/LB9duxizZ+16r7OrRqo I9vYh6XL32/UAz/qaPTb3WXv0hZXwgmVB2sNQsaEsLAXtsz1wJmerml8UetZFJynzb4j QHILNE39iSGWp8cZd4h/nHRXGJK0kZu5a0ocU= Received: by 10.101.138.8 with SMTP id q8mr3030908ann.164.1278313411193; Mon, 05 Jul 2010 00:03:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.98.3 with HTTP; Mon, 5 Jul 2010 00:03:11 -0700 (PDT) In-Reply-To: <4C318226.3040701@bankir.ru> References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> From: Pavel Stehule Date: Mon, 5 Jul 2010 09:03:11 +0200 Message-ID: Subject: Re: To: silly sad Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=UTF-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_20=-0.001 X-Spam-Level: X-Archive-Number: 201007/14 X-Sequence-Number: 34327 2010/7/5 silly sad : > On 07/05/10 10:43, Pavel Stehule wrote: > >> The good size for text or bytea is less than 100M and real max isn't >> 2G but it is 1G. LO isn't these limits because it isn't accessable on >> SQL level. > > any regular file on my filesystem isn't accessible on SQL level. > i am happy with them and never tried to store at a database. this is second extreme - you can use everything if you know what you do - and mainly it depends on applications and requests that you have to solve. Pavel > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > From sad@bankir.ru Mon Jul 5 07:11:13 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6E8A9632DD7 for ; Mon, 5 Jul 2010 04:11:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 06921-08 for ; Mon, 5 Jul 2010 07:11:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 4630D632BF3 for ; Mon, 5 Jul 2010 04:11:02 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OVfpU-0001nS-HD for pgsql-sql@postgresql.org; Mon, 05 Jul 2010 11:11:00 +0400 Received: from [192.168.1.6] [178.34.185.189] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 0F52F4; Mon, 5 Jul 2010 11:11:00 +0400 Message-ID: <4C318583.60306@bankir.ru> Date: Mon, 05 Jul 2010 11:10:59 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: Pavel Stehule CC: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/15 X-Sequence-Number: 34328 On 07/05/10 11:03, Pavel Stehule wrote: > 2010/7/5 silly sad: >> On 07/05/10 10:43, Pavel Stehule wrote: >> >>> The good size for text or bytea is less than 100M and real max isn't >>> 2G but it is 1G. LO isn't these limits because it isn't accessable on >>> SQL level. >> >> any regular file on my filesystem isn't accessible on SQL level. >> i am happy with them and never tried to store at a database. > > this is second extreme - you can use everything if you know what you > do - and mainly it depends on applications and requests that you have > to solve. the trouble is the initiator of the thread didn't determine what is his problem either storing of a zero-byte containing string or storing of huge strings. I answered him about BYTEA and he replied about BLOB. I only tried to say i didn't say a word about BLOB. P.S. Practically for storing pictures i prefer regular files. From pavel.stehule@gmail.com Mon Jul 5 07:18:31 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1F214632FA7 for ; Mon, 5 Jul 2010 04:18:31 -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 19281-01 for ; Mon, 5 Jul 2010 07:18:23 +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 B7D0A632DD7 for ; Mon, 5 Jul 2010 04:18:23 -0300 (ADT) Received: by gwj21 with SMTP id 21so608243gwj.19 for ; Mon, 05 Jul 2010 00:18:22 -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; bh=q5HoANMvyFAXSRqN9S0xHxXvde7+xAGWcsksPsF3168=; b=dL1Gh3BSunloqs5MoGQ01zWHDT7uiyACSt7xMGZKhN/fnFalm0Gd4bB7Zp6OqQW94c UBHuZcBSHj5d6ylc4F581a28JOVGmHB/687kD0skiy63rdz0KZAim0uaeFIHp5n6J8FA 3t+i5wRnDQ5q4IXIWw9yb4q9BCNHca9xea8p8= 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; b=mbQ10Q6LRgFvRea+sclKOGrLbBzW+U5i8QalGl3mu6J9Wnld6t1bw9BCbDKC8ruwUr Mql/3i6IaTDYlByDPkT4g1shN99UOVx2ZPYlI2NH01fuasCjB7jewTYS70SLT1I9jsFu 7eWnuMPC4S/uXjgnoWvXAwdghljgDPd9tiyv4= Received: by 10.101.107.10 with SMTP id j10mr2970899anm.122.1278314302246; Mon, 05 Jul 2010 00:18:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.98.3 with HTTP; Mon, 5 Jul 2010 00:18:02 -0700 (PDT) In-Reply-To: <4C318583.60306@bankir.ru> References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> From: Pavel Stehule Date: Mon, 5 Jul 2010 09:18:02 +0200 Message-ID: Subject: Re: To: silly sad Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=UTF-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/16 X-Sequence-Number: 34329 2010/7/5 silly sad : > On 07/05/10 11:03, Pavel Stehule wrote: >> >> 2010/7/5 silly sad: >>> >>> On 07/05/10 10:43, Pavel Stehule wrote: >>> >>>> The good size for text or bytea is less than 100M and real max isn't >>>> 2G but it is 1G. LO isn't these limits because it isn't accessable on >>>> SQL level. >>> >>> any regular file on my filesystem isn't accessible on SQL level. >>> i am happy with them and never tried to store at a database. >> >> this is second extreme - you can use everything if you know what you >> do - and mainly it depends on applications and requests that you have >> to solve. > > the trouble is the initiator of the thread didn't determine what is his > problem either storing of a zero-byte containing string or storing of huge > strings. > I answered him about BYTEA and he replied about BLOB. > I only tried to say i didn't say a word about BLOB. yes > > P.S. > Practically for storing pictures i prefer regular files. > how I say - it depends on application - sometime can be useful have to access to all data only from db connect - for million small pictures the bytea can be best. Pavel From sad@bankir.ru Mon Jul 5 07:29:04 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 086A1633572 for ; Mon, 5 Jul 2010 04:29:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 64567-04 for ; Mon, 5 Jul 2010 07:28:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 603CD633302 for ; Mon, 5 Jul 2010 04:28:56 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OVg6o-0003ig-Ib for pgsql-sql@postgresql.org; Mon, 05 Jul 2010 11:28:54 +0400 Received: from [192.168.1.6] [178.34.185.189] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 010065; Mon, 5 Jul 2010 11:28:54 +0400 Message-ID: <4C3189B5.1090906@bankir.ru> Date: Mon, 05 Jul 2010 11:28:53 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/17 X-Sequence-Number: 34330 On 07/05/10 11:18, Pavel Stehule wrote: >> P.S. >> Practically for storing pictures i prefer regular files. >> > > how I say - it depends on application - sometime can be useful have to > access to all data only from db connect - for million small pictures > the bytea can be best. i really love postgres TEXT type, but i hate CSTRING input-output bottleneck. From pavel.stehule@gmail.com Mon Jul 5 07:51:55 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D9CFC632672 for ; Mon, 5 Jul 2010 04:51:55 -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 11875-01 for ; Mon, 5 Jul 2010 07:51:48 +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 61642632665 for ; Mon, 5 Jul 2010 04:51:48 -0300 (ADT) Received: by gwj21 with SMTP id 21so613527gwj.19 for ; Mon, 05 Jul 2010 00:51:47 -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; bh=S/PkAmlAul5Nq5BahXTmfqzu84zqWhahOzWrnNT+R+4=; b=Od7SM2tHZiycVLsk4mu+ATLAmPQ5WavnbyCmbKBZZIiqx6O4GghylVsk2DBqP/643L 6ZfMvI9PoRc0Fmr2nVL7id5i/v4qAUxbHWDzIUG0Tp1mQ/wR5iuf+z/lFRjA/jxPW4vf x1IA6qe0rxAFaClP4r7HH/jlzNgGJ1WGx9P1E= 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; b=EekE1opJoz+jW2FlNFjQJxB7wXTXM1p2wdKH86JuNl4oCs5sOWTmxBWq98guStpLfy acLb5VuUUSeKgT1moLWnBVrH4z2QiT4b6cImc0C6JUmN7AaovkUtjPJxsichRdlx1l2W LWN1uJyYVnJ77cG2c1H24+5Z8TBQr0Ml5/gwM= Received: by 10.90.114.14 with SMTP id m14mr199866agc.52.1278316306245; Mon, 05 Jul 2010 00:51:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.98.3 with HTTP; Mon, 5 Jul 2010 00:51:26 -0700 (PDT) In-Reply-To: <4C3189B5.1090906@bankir.ru> References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> <4C3189B5.1090906@bankir.ru> From: Pavel Stehule Date: Mon, 5 Jul 2010 09:51:26 +0200 Message-ID: Subject: Re: To: silly sad Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=UTF-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/18 X-Sequence-Number: 34331 2010/7/5 silly sad : > On 07/05/10 11:18, Pavel Stehule wrote: > >>> P.S. >>> Practically for storing pictures i prefer regular files. >>> >> >> how I say - it depends on application - sometime can be useful have to >> access to all data only from db connect - for million small pictures >> the bytea can be best. > > i really love postgres TEXT type, but i hate CSTRING input-output why? and it isn't true - you can use a binary interface of PQexecParams - minimally for text and bytea it is very simple Pavel > bottleneck. > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > From justin@magwerks.com Tue Jul 6 16:53:20 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 194E8633380 for ; Tue, 6 Jul 2010 13:53:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 90293-07 for ; Tue, 6 Jul 2010 16:53:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.magwerks.com (mail.magwerks.com [209.248.233.131]) by mail.postgresql.org (Postfix) with ESMTP id 9E95263327D for ; Tue, 6 Jul 2010 13:53:12 -0300 (ADT) Received: from [192.168.1.35] by mail.magwerks.com (GMS 15.01.3664/RS2750.00.1b502c7c) with ESMTP id nmryeaaa for pgsql-sql@postgresql.org; Tue, 6 Jul 2010 12:53:11 -0400 Message-ID: <4C336D73.2000105@magwerks.com> Date: Tue, 06 Jul 2010 12:52:51 -0500 From: Justin Graf User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Pavel Stehule CC: silly sad , pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> <4C3189B5.1090906@bankir.ru> In-Reply-To: Content-Type: multipart/mixed; boundary="------------040401050707000400060903" X-AntiSpam: Checked for restricted content by Gordano's AntiSpam Software X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-5 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/19 X-Sequence-Number: 34332 This is a multi-part message in MIME format. --------------040401050707000400060903 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit I wrote an article covering this on the wiki http://wiki.postgresql.org/wiki/BinaryFilesInDB I need to update to for 9.0 as bytea now allows HEX format strings http://developer.postgresql.org/pgdocs/postgres/datatype-binary.html All legitimate Magwerks Corporation quotations are sent in a .PDF file attachment with a unique ID number generated by our proprietary quotation system. Quotations received via any other form of communication will not be honored. CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally privileged, confidential or other information proprietary to Magwerks Corporation and is intended solely for the use of the individual to whom it addresses. If the reader of this e-mail is not the intended recipient or authorized agent, the reader is hereby notified that any unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this e-mail immediately. Thank you. --------------040401050707000400060903 Content-Type: text/x-vcard; charset="utf-8" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="justin.vcf" YmVnaW46dmNhcmQNCmZuOkp1c3RpbiBHcmFmDQpuOkdyYWY7SnVzdGluDQpvcmc6TWFnd2Vy a3MgQ29ycA0KYWRyOjs7NTAxIENvbW1lcmNlIERyaXZlO0RhbnZpbGxlIDtJTjs0NjEyMjtV U0ENCmVtYWlsO2ludGVybmV0Omp1c3RpbkBtYWd3ZXJrcy5jb20NCnRlbDt3b3JrOjMxNy0y NDEtODAxMSBleHQgNzAzDQp0ZWw7ZmF4OjMxNy0yNDEtODAxNQ0KeC1tb3ppbGxhLWh0bWw6 RkFMU0UNCnVybDp3d3cubWFnd2Vya3MuY29tDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoN Cg== --------------040401050707000400060903-- From sad@bankir.ru Wed Jul 7 05:01:00 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 964B5632B87 for ; Wed, 7 Jul 2010 02:01:00 -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 42235-08 for ; Wed, 7 Jul 2010 05:00:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 7F02E63296A for ; Wed, 7 Jul 2010 02:00:52 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OWMkb-0007ea-6v for pgsql-sql@postgresql.org; Wed, 07 Jul 2010 09:00:49 +0400 Received: from [192.168.1.6] [94.233.201.102] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 082BC1; Wed, 7 Jul 2010 09:00:48 +0400 Message-ID: <4C340A00.5020201@bankir.ru> Date: Wed, 07 Jul 2010 09:00:48 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> <4C3189B5.1090906@bankir.ru> <4C336D73.2000105@magwerks.com> In-Reply-To: <4C336D73.2000105@magwerks.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/21 X-Sequence-Number: 34334 On 07/06/10 21:52, Justin Graf wrote: > I wrote an article covering this on the wiki > > http://wiki.postgresql.org/wiki/BinaryFilesInDB there are some "red flags" in communication (particularly reading papers) one of them is "binary data" which ITSELF IS NONSENCE. From justin@magwerks.com Wed Jul 7 13:49:25 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id DEF67633401 for ; Wed, 7 Jul 2010 10:49:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 01786-02-8 for ; Wed, 7 Jul 2010 13:49:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.magwerks.com (mail.magwerks.com [209.248.233.131]) by mail.postgresql.org (Postfix) with ESMTP id 5CEC6637B9F for ; Wed, 7 Jul 2010 10:36:48 -0300 (ADT) Received: from [192.168.1.35] by mail.magwerks.com (GMS 15.01.3664/RS2750.00.1b502c7c) with ESMTP id kzvyeaaa for pgsql-sql@postgresql.org; Wed, 7 Jul 2010 09:36:46 -0400 Message-ID: <4C3490B4.6060903@magwerks.com> Date: Wed, 07 Jul 2010 09:35:32 -0500 From: Justin Graf User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: silly sad CC: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> <4C3189B5.1090906@bankir.ru> <4C336D73.2000105@magwerks.com> <4C340A00.5020201@bankir.ru> In-Reply-To: <4C340A00.5020201@bankir.ru> Content-Type: multipart/mixed; boundary="------------050907080707050200090908" X-AntiSpam: Checked for restricted content by Gordano's AntiSpam Software X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-5 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/28 X-Sequence-Number: 34341 This is a multi-part message in MIME format. --------------050907080707050200090908 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 7/7/2010 12:00 AM, silly sad wrote: > On 07/06/10 21:52, Justin Graf wrote: > >> I wrote an article covering this on the wiki >> >> http://wiki.postgresql.org/wiki/BinaryFilesInDB >> > there are some "red flags" in communication > (particularly reading papers) > one of them is "binary data" which ITSELF IS NONSENCE. > WHAT??????? You do understand that if you don't like it you can spend time fixing it. All legitimate Magwerks Corporation quotations are sent in a .PDF file attachment with a unique ID number generated by our proprietary quotation system. Quotations received via any other form of communication will not be honored. CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally privileged, confidential or other information proprietary to Magwerks Corporation and is intended solely for the use of the individual to whom it addresses. If the reader of this e-mail is not the intended recipient or authorized agent, the reader is hereby notified that any unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this e-mail immediately. Thank you. --------------050907080707050200090908 Content-Type: text/x-vcard; charset="utf-8" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="justin.vcf" YmVnaW46dmNhcmQNCmZuOkp1c3RpbiBHcmFmDQpuOkdyYWY7SnVzdGluDQpvcmc6TWFnd2Vy a3MgQ29ycA0KYWRyOjs7NTAxIENvbW1lcmNlIERyaXZlO0RhbnZpbGxlIDtJTjs0NjEyMjtV U0ENCmVtYWlsO2ludGVybmV0Omp1c3RpbkBtYWd3ZXJrcy5jb20NCnRlbDt3b3JrOjMxNy0y NDEtODAxMSBleHQgNzAzDQp0ZWw7ZmF4OjMxNy0yNDEtODAxNQ0KeC1tb3ppbGxhLWh0bWw6 RkFMU0UNCnVybDp3d3cubWFnd2Vya3MuY29tDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoN Cg== --------------050907080707050200090908-- From sad@bankir.ru Thu Jul 8 07:32:09 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EFDE7633190 for ; Thu, 8 Jul 2010 04:32:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 11466-09 for ; Thu, 8 Jul 2010 07:32:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id D4FE5632ED6 for ; Thu, 8 Jul 2010 04:32:01 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OWlaR-0002gM-2w for pgsql-sql@postgresql.org; Thu, 08 Jul 2010 11:31:59 +0400 Received: from [192.168.1.6] [94.233.222.172] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 115F67; Thu, 8 Jul 2010 11:31:58 +0400 Message-ID: <4C357EEE.9000406@bankir.ru> Date: Thu, 08 Jul 2010 11:31:58 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: Justin Graf CC: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> <4C3189B5.1090906@bankir.ru> <4C336D73.2000105@magwerks.com> <4C340A00.5020201@bankir.ru> <4C3490B4.6060903@magwerks.com> In-Reply-To: <4C3490B4.6060903@magwerks.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/42 X-Sequence-Number: 34355 On 07/07/10 18:35, Justin Graf wrote: > On 7/7/2010 12:00 AM, silly sad wrote: >> On 07/06/10 21:52, Justin Graf wrote: >> >>> I wrote an article covering this on the wiki >>> >>> http://wiki.postgresql.org/wiki/BinaryFilesInDB >>> >> there are some "red flags" in communication >> (particularly reading papers) >> one of them is "binary data" which ITSELF IS NONSENCE. >> > > WHAT??????? > > You do understand that if you don't like it you can spend time fixing it. fix what? human minds of so-called programmers? From dpage@postgresql.org Thu Jul 8 07:39:03 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 80248633190 for ; Thu, 8 Jul 2010 04:39:03 -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 08795-04 for ; Thu, 8 Jul 2010 07:38:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mail.postgresql.org (Postfix) with ESMTP id DF94C632B23 for ; Thu, 8 Jul 2010 04:38:55 -0300 (ADT) Received: by wwi18 with SMTP id 18so1692426wwi.19 for ; Thu, 08 Jul 2010 00:38:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.170.72 with SMTP id o50mr2141903wel.69.1278574727456; Thu, 08 Jul 2010 00:38:47 -0700 (PDT) Received: by 10.216.51.74 with HTTP; Thu, 8 Jul 2010 00:38:47 -0700 (PDT) In-Reply-To: <4C357EEE.9000406@bankir.ru> References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> <4C3189B5.1090906@bankir.ru> <4C336D73.2000105@magwerks.com> <4C340A00.5020201@bankir.ru> <4C3490B4.6060903@magwerks.com> <4C357EEE.9000406@bankir.ru> Date: Thu, 8 Jul 2010 08:38:47 +0100 X-Google-Sender-Auth: llgbxzx5rgtAKd4BiHQRVhFQJlE Message-ID: Subject: Re: From: Dave Page To: silly sad Cc: Justin Graf , pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/44 X-Sequence-Number: 34357 On Thu, Jul 8, 2010 at 8:31 AM, silly sad wrote: > On 07/07/10 18:35, Justin Graf wrote: >> >> On 7/7/2010 12:00 AM, silly sad wrote: >>> >>> On 07/06/10 21:52, Justin Graf wrote: >>> >>>> I wrote an article covering this on the wiki >>>> >>>> http://wiki.postgresql.org/wiki/BinaryFilesInDB >>>> >>> there are some "red flags" in communication >>> (particularly reading papers) >>> one of them is "binary data" which ITSELF IS NONSENCE. >>> >> >> WHAT??????? >> >> You do understand that if you don't like it you can spend time fixing it. > > fix what? human minds of so-called programmers? That is not appropriate behaviour for the PostgreSQL mailing lists. Please treat others with respect, even if you disagree with them. -- Dave Page PostgreSQL Core Team From sad@bankir.ru Thu Jul 8 08:47:57 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 6A6B5632E8E for ; Thu, 8 Jul 2010 05:47:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 71867-07 for ; Thu, 8 Jul 2010 08:47:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 1741B632E59 for ; Thu, 8 Jul 2010 05:47:50 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OWmlo-0003e3-93 for pgsql-sql@postgresql.org; Thu, 08 Jul 2010 12:47:48 +0400 Received: from [192.168.1.6] [94.233.222.172] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 0C461D; Thu, 8 Jul 2010 12:47:47 +0400 Message-ID: <4C3590B3.6000709@bankir.ru> Date: Thu, 08 Jul 2010 12:47:47 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: References: <4C3177B8.3080803@bankir.ru> <4C317D82.7020702@bankir.ru> <4C318226.3040701@bankir.ru> <4C318583.60306@bankir.ru> <4C3189B5.1090906@bankir.ru> <4C336D73.2000105@magwerks.com> <4C340A00.5020201@bankir.ru> <4C3490B4.6060903@magwerks.com> <4C357EEE.9000406@bankir.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201007/45 X-Sequence-Number: 34358 On 07/08/10 11:38, Dave Page wrote: > On Thu, Jul 8, 2010 at 8:31 AM, silly sad wrote: >> On 07/07/10 18:35, Justin Graf wrote: >>> >>> On 7/7/2010 12:00 AM, silly sad wrote: >>>> >>>> On 07/06/10 21:52, Justin Graf wrote: >>>> >>>>> I wrote an article covering this on the wiki >>>>> >>>>> http://wiki.postgresql.org/wiki/BinaryFilesInDB >>>>> >>>> there are some "red flags" in communication >>>> (particularly reading papers) >>>> one of them is "binary data" which ITSELF IS NONSENCE. >>>> >>> >>> WHAT??????? >>> >>> You do understand that if you don't like it you can spend time fixing it. >> >> fix what? human minds of so-called programmers? > > That is not appropriate behaviour for the PostgreSQL mailing lists. > Please treat others with respect, even if you disagree with them. i do not disagree. i only meant a fixing of human communication problem is out of my hand.