Loading Binary Data into Bytea Fields?

Поиск
Список
Период
Сортировка
Искать

Loading Binary Data into Bytea Fields?

От:
Jerry LeVan <jerry.levan@eku.edu>
Дата:
I am getting ready to try to add image viewing into my postgresql browser...

I am probably going to start with storing a thumbnail and a URL for the 
actual
image in the table.

Is there any demo code for loading binary (actually images...) data into 
a bytea field.

The data is going to come from a file....

Jerry

PS: Searching the archives has become painfully slow for me...are there 
any mirror
sites that have reasonable response times?

Re: Loading Binary Data into Bytea Fields?

От:
"Joshua D. Drake" <jd@commandprompt.com>
Дата:
Hello,

I suggest using large objects over bytea fields.
What language are you using?

Sincerely,

Joshua D. Drake

Jerry LeVan wrote:

> I am getting ready to try to add image viewing into my postgresql 
> browser...
>
> I am probably going to start with storing a thumbnail and a URL for 
> the actual
> image in the table.
>
> Is there any demo code for loading binary (actually images...) data 
> into a bytea field.
>
> The data is going to come from a file....
>
> Jerry
>
> PS: Searching the archives has become painfully slow for me...are 
> there any mirror
> sites that have reasonable response times?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



-- 
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

Re: Loading Binary Data into Bytea Fields?

От:
Jerry LeVan <jerry.levan@eku.edu>
Дата:
Objective C via Libpq, the thumbnails are not going to be very big.

Large objects seem a bit out of place and require extra care
when backing up and doing deletions....

Jerry

On Jul 6, 2004, at 11:44 PM, Joshua D. Drake wrote:

Hello,

I suggest using large objects over bytea fields.
What language are you using?

Sincerely,

Joshua D. Drake

Jerry LeVan wrote:

I am getting ready to try to add image viewing into my postgresql browser...

I am probably going to start with storing a thumbnail and a URL for the 
actual
image in the table.

Is there any demo code for loading binary (actually images...) data into 
a bytea field.

The data is going to come from a file....

Jerry

PS: Searching the archives has become painfully slow for me...are there 
any mirror
sites that have reasonable response times?

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



-- 

Re: Loading Binary Data into Bytea Fields?

От:
Robby Russell <robby@planetargon.com>
Дата:
On Wed, 2004-07-07 at 05:12, Jerry LeVan wrote:
> Objective C via Libpq, the thumbnails are not going to be very big.
> 
> Large objects seem a bit out of place and require extra care
> when backing up and doing deletions....
> 
> Jerry

Well, from my experience large objects are faster than bytea. 
Also, some info on the main 3-4 different options:
   http://www.varlena.com/varlena/GeneralBits/25.html (look under the
heading, "storing images in database"

One method that they mentiond was storing them in a text field with
Base-64 encoding, as this would allow you to export/import/talk with
other databases (mysql, ...) should that be required in your
environment. 

cheers,

-Robby

-- 
Robby Russell | Owner.Developer.Geek
PLANET ARGON  | www.planetargon.com
Portland, OR  | robby@planetargon.com
503.351.4730  | blog.planetargon.com


FAQ