Skip site navigation (1) Skip section navigation (2)

Re: BLOB help needed...

From: Guy Fraser <guy(at)incentre(dot)net>
To: "Taber, Mark" <Mark(dot)Taber(at)dof(dot)ca(dot)gov>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: BLOB help needed...
Date: 2004-04-27 18:36:16
Message-ID: 408EA820.8010202@incentre.net (view raw or flat)
Thread:
Lists: pgsql-general
If you are using php, the two functions below should help.

http://ca.php.net/manual/en/function.pg-escape-bytea.php
http://ca.php.net/manual/en/function.pg-unescape-bytea.php

Taber, Mark wrote:

> We’re implementing our first PostgreSQL database, and enjoying it very 
> much. However, we have a table that will store binary image files (pie 
> charts, etc.) for later display on a dynamic webpage. While we’re 
> putting together our prototype application, I’ve been asked by the 
> programmers (I’m the DBA) to “put the images in the database.” I can 
> see how to do this using Large Objects, but then getting them out 
> again seems problematic, and the documentation is a bit sketchy. Would 
> BYTEA columns be better? However, it seems to me that there is no easy 
> way using psql to load images into a BYTEA column. Any help would be 
> greatly appreciated.
>
> Regards,
>
> Mark Taber
>
> State of California
>
> Department of Finance
>
> Infrastructure & Architecture Unit
>
> 916.323.3104 x 2945
>

In response to

Responses

pgsql-general by date

Next:From: Ron St-PierreDate: 2004-04-27 19:20:51
Subject: Re: composite type and assignment in plpgsql
Previous:From: Ivan Sergio BorgonovoDate: 2004-04-27 18:27:51
Subject: Re: composite type and assignment in plpgsql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group