From sgnerd@yahoo.com.sg Thu Sep 25 04:07:09 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A4C3AD1B4E8 for ; Thu, 25 Sep 2003 04:07:09 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 53488-07 for ; Thu, 25 Sep 2003 01:06:38 -0300 (ADT) Received: from smtp012.mail.yahoo.com (smtp012.mail.yahoo.com [216.136.173.32]) by svr1.postgresql.org (Postfix) with SMTP id 6D152D1B4E1 for ; Thu, 25 Sep 2003 01:06:37 -0300 (ADT) Received: from ptil-138-190-chn.primus-india.net (HELO IVESIA67) (sgnerd@203.196.190.138 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 25 Sep 2003 04:06:34 -0000 Message-ID: <00f701c3831b$242f2150$7502a8c0@hdsc.com> Reply-To: "Kumar" From: "Kumar" To: "psql" Subject: Large Objects and Bytea Date: Thu, 25 Sep 2003 09:41:28 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00F4_01C38349.31BDA7F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_30_40 X-Spam-Level: X-Archive-Number: 200309/291 X-Sequence-Number: 15269 This is a multi-part message in MIME format. ------=_NextPart_000_00F4_01C38349.31BDA7F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Friends, I am running Postgres 7.3.4 on RH Linux 7.2. I am migrating MS SQL DB to Postgres DB. I have tables with columns of data= type 'Image' in the MS SQL database.=20 IF I choose 'bytea' datatype, I am afraid it may lead to poor performance o= f the database (which I read from the manual). In this case what is the bes= t data type to use. Please suggest me. The explanation of using LOB objects in a table and to w= rite them with image is not very clear in the documentation. Can any one se= nd me any link or white paper or examples about it. Thanks in advance. Kumar ------=_NextPart_000_00F4_01C38349.31BDA7F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Friends,
 
I am running Postgres 7.3.4 on RH Linux 7.2.
 
I am migrating MS SQL DB to Postgres DB. I have tables = with=20 columns of data type 'Image' in the MS SQL database.
IF I choose 'bytea' datatype, I am afraid it may lead t= o poor=20 performance of the database (which I read from the manual). In this case wh= at is=20 the best data type to use.
 
Please suggest me. The explanation of using LOB objects= in a=20 table and to write them with image is not very clear in the documentation. = Can=20 any one send me any link or white paper or examples about=20 it.
 
Thanks in advance.
 
Kumar

------=_NextPart_000_00F4_01C38349.31BDA7F0-- From sad@bankir.ru Thu Sep 25 04:53:21 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E848AD1B502 for ; Thu, 25 Sep 2003 04:53:21 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 61661-01 for ; Thu, 25 Sep 2003 01:52:50 -0300 (ADT) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id 81201D1B4E2 for ; Thu, 25 Sep 2003 01:52:49 -0300 (ADT) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id A7EB5912C8 for ; Thu, 25 Sep 2003 08:52:47 +0400 (MSD) Received: from sad.localnet.ru (sad.localnet.ru [10.0.0.33]) by rock.spider.ru (Postfix) with ESMTP id 7018591221 for ; Thu, 25 Sep 2003 08:52:47 +0400 (MSD) Content-Type: text/plain; charset="iso-8859-1" From: sad Organization: IT To: "psql" Subject: Re: Large Objects and Bytea Date: Thu, 25 Sep 2003 08:55:57 +0400 User-Agent: KMail/1.4.3 References: <00f701c3831b$242f2150$7502a8c0@hdsc.com> In-Reply-To: <00f701c3831b$242f2150$7502a8c0@hdsc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200309250855.57219.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/293 X-Sequence-Number: 15271 Hi, Friends ! On Thursday 25 September 2003 08:11, you wrote: > I am migrating MS SQL DB to Postgres DB. I have tables with columns of da= ta > type 'Image' in the MS SQL database. IF I choose 'bytea' datatype, I am > afraid it may lead to poor performance of the database (which I read from > the manual). In this case what is the best data type to use. I am using TEXT fields to store images and pdfs. There is one "feature": ZERO bytes causes interruption of input and output. so I am translating Zeroes to '#0' and '#' to '#1' (it is similar to work w= ith=20 bytea) I am really not sure that's the best, but usefull. BTW, i ask Developers: can you remove this "feature" of ZEROES in a TEXT ? AFAIK the TEXT-type itself allows ANY bytes to store !=20 (its length representet explisitly in 4 bytes) The "feature" obviosly grown from C strings...... From elein@varlena.com Thu Sep 25 17:17:30 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 07518D1B529 for ; Thu, 25 Sep 2003 17:17:30 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 32445-05 for ; Thu, 25 Sep 2003 14:16:58 -0300 (ADT) Received: from varlena.com (adsl-64-175-152-58.dsl.snfc21.pacbell.net [64.175.152.58]) by svr1.postgresql.org (Postfix) with ESMTP id 99521D1B4ED for ; Thu, 25 Sep 2003 14:16:57 -0300 (ADT) Received: by varlena.com (Postfix on SuSE Linux 7.3 (i386), from userid 500) id 5F5F538C8A; Thu, 25 Sep 2003 10:15:08 -0700 (PDT) Date: Thu, 25 Sep 2003 10:15:08 -0700 From: elein To: Kumar Cc: psql Subject: Re: Large Objects and Bytea Message-ID: <20030925101508.K22599@cookie.local> Mail-Followup-To: Kumar , psql References: <00f701c3831b$242f2150$7502a8c0@hdsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00f701c3831b$242f2150$7502a8c0@hdsc.com> User-Agent: Mutt/1.3.22.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/310 X-Sequence-Number: 15288 In this week's General Bits, we talk about using large objects. Perhaps this might help you understand what is involved with using them. http://www.varlena.com/GeneralBits/ cheers, elein@varlena.com On Thu, Sep 25, 2003 at 09:41:28AM +0530, Kumar wrote: > Hi Friends, > > I am running Postgres 7.3.4 on RH Linux 7.2. > > I am migrating MS SQL DB to Postgres DB. I have tables with columns of data > type 'Image' in the MS SQL database. > IF I choose 'bytea' datatype, I am afraid it may lead to poor performance of > the database (which I read from the manual). In this case what is the best data > type to use. > > Please suggest me. The explanation of using LOB objects in a table and to write > them with image is not very clear in the documentation. Can any one send me any > link or white paper or examples about it. > > Thanks in advance. > > Kumar >