From: | Trinath Somanchi <trinath(dot)somanchi(at)gmail(dot)com> |
---|---|
To: | silly sad <sad(at)bankir(dot)ru> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: |
Date: | 2010-07-05 06:30:15 |
Message-ID: | AANLkTikMUp9xLEYYT8rlXX30Q7Gl1IusxXnsTnwQvysz@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)bankir(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
--
Regards,
----------------------------------------------
Trinath Somanchi,
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2010-07-05 06:35:13 | Re: |
Previous Message | silly sad | 2010-07-05 06:12:08 | Re: |