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......