pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Trinath Somanchi <trinath.somanchi@gmail.com>
Cc: silly sad <sad@bankir.ru>
Cc: pgsql-sql@postgresql.org
Subject: Re:
Date: Mon, 5 Jul 2010 08:35:13 +0200
Message-ID: <AANLkTim14jFZXqTo1-LsFvg9HXYcrkEwStqJpADYEdLg@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikMUp9xLEYYT8rlXX30Q7Gl1IusxXnsTnwQvysz@mail.gmail.com>
References: <AANLkTimLXJitQ9sPf0I-iDeRwtrWloLJbfGzE-E2hGif@mail.gmail.com>
	<4C3177B8.3080803@bankir.ru>
	<AANLkTikMUp9xLEYYT8rlXX30Q7Gl1IusxXnsTnwQvysz@mail.gmail.com>

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 <trinath.somanchi@gmail.com>:
> 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 <sad@bankir.ru> 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,
>



view thread (19+ messages)  latest in thread

Message-ID: <AANLkTim14jFZXqTo1-LsFvg9HXYcrkEwStqJpADYEdLg@mail.gmail.com>
Permalink:  ../AANLkTim14jFZXqTo1-LsFvg9HXYcrkEwStqJpADYEdLg@mail.gmail.com/
Also on:    postgresql.org/message-id/AANLkTim14jFZXqTo1-LsFvg9HXYcrkEwStqJpADYEdLg@mail.gmail.com

 · 

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: pavel.stehule@gmail.com, trinath.somanchi@gmail.com, sad@bankir.ru
  Subject: Re:
  In-Reply-To: <AANLkTim14jFZXqTo1-LsFvg9HXYcrkEwStqJpADYEdLg@mail.gmail.com>

* 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