pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Timothy_maguire@hartehanks.com
To: Jean-Christophe FABRE <jean-christophe.fabre@ensam.inra.fr>
Cc: pgsql-php@postgresql.org
Cc: pgsql-php-owner@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: bytea or large object
Date: Wed, 3 Apr 2002 09:48:06 -0500
Message-ID: <OFAE50E3EE.02EC0FD1-ON85256B90.00512DD3@hartehanks.com> (raw)


an alternative that I do for situations like this is store the file
location in the db, then when you want to call it, you can generate a link
on the web page from the db pointing to the file.  The file is stored on
the server, not in the db.

Tim.

Timothy P. Maguire
Web Developer II
Harte-Hanks
978 436 3325



                                                                                                                                      
                      Jean-Christophe FABRE                                                                                           
                      <jean-christophe.fabre@ens        To:       pgsql-sql@postgresql.org, pgsql-php@postgresql.org                  
                      am.inra.fr>                       cc:                                                                           
                      Sent by:                          Subject:  bytea or large object                                               
                      pgsql-php-owner@postgresql                                                                                      
                      .org                                                                                                            
                                                                                                                                      
                                                                                                                                      
                      04/03/2002 09:47 AM                                                                                             
                                                                                                                                      
                                                                                                                                      





Hi,

I would like to store .pdf files in a database, which is accessed through a
PHP interface.
which is the best way to store binary data?
- bytea? (with the tricky handling of escape chars)
- large objects?

thanks

JC

PS: I didn't found any example of scripts using bytea in PHP, does someone
has some?


_________________________________________________________
Jean-Christophe FABRE
INRA - UMR Sol & Environnement tel: +33 (0)4 99 61 23 51
2, place Viala fax: +33 (0)4 67 63 26 14
34060 MONTPELLIER cedex 1
FRANCE


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
HARTE- HANKS PRIVILEGED AND CONFIDENTIAL INFORMATION- if you are not the
addressee or authorized to receive this for the addressee, you must not
use, copy, disclose or take any action based on this message or any
information herein and should delete this message.







view thread (7+ messages)  latest in thread

Message-ID: <OFAE50E3EE.02EC0FD1-ON85256B90.00512DD3@hartehanks.com>
Permalink:  ../OFAE50E3EE.02EC0FD1-ON85256B90.00512DD3@hartehanks.com/
Also on:    postgresql.org/message-id/OFAE50E3EE.02EC0FD1-ON85256B90.00512DD3@hartehanks.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: Timothy_maguire@hartehanks.com, jean-christophe.fabre@ensam.inra.fr, pgsql-php@postgresql.org, pgsql-php-owner@postgresql.org
  Subject: Re: bytea or large object
  In-Reply-To: <OFAE50E3EE.02EC0FD1-ON85256B90.00512DD3@hartehanks.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