pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sad <sad@bankir.ru>
To: psql <pgsql-sql@postgresql.org>
Subject: Re: Large Objects and Bytea
Date: Thu, 25 Sep 2003 08:55:57 +0400
Message-ID: <200309250855.57219.sad@bankir.ru> (raw)
In-Reply-To: <00f701c3831b$242f2150$7502a8c0@hdsc.com>
References: <00f701c3831b$242f2150$7502a8c0@hdsc.com>

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

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 with 
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 ! 
(its length representet explisitly in 4 bytes)
The "feature" obviosly grown from C strings......






view thread (3+ messages)  latest in thread

Message-ID: <200309250855.57219.sad@bankir.ru>
Permalink:  ../200309250855.57219.sad@bankir.ru/
Also on:    postgresql.org/message-id/200309250855.57219.sad@bankir.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sad@bankir.ru
  Subject: Re: Large Objects and Bytea
  In-Reply-To: <200309250855.57219.sad@bankir.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox