Re: Record

Lists: pgsql-general
From: "BNT SOFT" <julio(at)bntsoft(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Record
Date: 2001-10-21 03:14:23
Message-ID: 000d01c159de$7c92ece0$3abbb1c8@julio
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi, I am developing an application in delphi using the postgresql, I am not getting to record an image, I am using the type OID, but I didn't have success ties now.
It would like you to help me, therefore I don't know how to use those commands.

Thank you for the attention,

Almeida Julio, São Paulo - Brazil


From: "Aasmund Midttun Godal" <postgresql(at)envisity(dot)com>
To: julio(at)bntsoft(dot)com(dot)br
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Record
Date: 2001-10-23 22:04:35
Message-ID: 20011023220435.6933.qmail@ns.krot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I am not sure I understand what you mean. However if you are wanting to store an image in a table you have 2 options:

1. bytea fields.
2. large objects.

Bytea is probably the way to go... look it up in the docs...

Regards,

Aasmund.

On Sun, 21 Oct 2001 00:14:23 -0300, "BNT SOFT" <julio(at)bntsoft(dot)com(dot)br> wrote:
> Hi, I am developing an application in delphi using the postgresql, I am not getting to record an image, I am using the type OID, but I didn't have success ties now.
> It would like you to help me, therefore I don't know how to use those commands.
>
> Thank you for the attention,
>
> Almeida Julio, São Paulo - Brazil

Aasmund Midttun Godal

aasmund(at)godal(dot)com - http://www.godal.com/
+47 40 45 20 46


From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: Aasmund Midttun Godal <postgresql(at)envisity(dot)com>
Cc: <julio(at)bntsoft(dot)com(dot)br>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Record
Date: 2001-10-24 14:22:39
Message-ID: Pine.LNX.4.33L2.0110241121000.25995-100000@aguila.protecne.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, 23 Oct 2001, Aasmund Midttun Godal wrote:

> I am not sure I understand what you mean. However if you are wanting to store an image in a table you have 2 options:
>
> 1. bytea fields.
> 2. large objects.

Third option is to encode the image (base64?) and then store as text.
It's probably slower (since you have to decode it everytime), uses much
more space, but you don't have to worry about escaping the byte
sequence.

--
Alvaro Herrera (<alvherre[(at)]atentus(dot)com>)
Jajaja! Solo hablaba en serio!


From: "Aasmund Midttun Godal" <postgresql(at)envisity(dot)com>
To: alvherre(at)atentus(dot)com
Cc: julio(at)bntsoft(dot)com(dot)br, pgsql-general(at)postgresql(dot)org
Subject: Re: Record
Date: 2001-10-24 15:19:47
Message-ID: 20011024151947.10803.qmail@ns.krot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Escaping the byte sequence is quite simple:

s/([^\w])/sprintf("\\%03o", ord($1))/eg;
(in perl).

On Wed, 24 Oct 2001 11:22:39 -0300 (CLST), Alvaro Herrera <alvherre(at)atentus(dot)com> wrote:
> On Tue, 23 Oct 2001, Aasmund Midttun Godal wrote:
>
>
> Third option is to encode the image (base64?) and then store as text.
> It's probably slower (since you have to decode it everytime), uses much
> more space, but you don't have to worry about escaping the byte
> sequence.
>
> --
> Alvaro Herrera (<alvherre[(at)]atentus(dot)com>)
> Jajaja! Solo hablaba en serio!
>

Aasmund Midttun Godal

aasmund(at)godal(dot)com - http://www.godal.com/
+47 40 45 20 46