pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedHelp with pg_loimport
3+ messages / 3 participants
[nested] [flat]
* Help with pg_loimport
@ 2001-04-21 22:09 Richard Whittaker <richard@connections.yk.ca>
2001-04-22 12:31 ` Re: Help with pg_loimport Martín Marqués <martin@bugs.unl.edu.ar>
0 siblings, 1 reply; 3+ messages in thread
From: Richard Whittaker @ 2001-04-21 22:09 UTC (permalink / raw)
To: pgsql-php
I posted this orignally on phpbuilder.net, but I also wanted to try here as
well...
Thanks kindly!
Richard.
Author: Richard Whittaker (199.247.236.117)
Date: 2001-04-21 16:15:13
Greetings:
Does anyone have any examples of using the pg_loimport routines in PHP?...
I have a requirement to be able to import a binary file (an image) into a
table that has three columns.
The first two columns are sequence integers, and the third is an OID
column. I would like to be able, via my PHP script, to insert a new image,
with the two integers, but I don't see any examples of this for PostGres
and PHP... Is this possible to do at all?...
Thanks muchly in advance,
Richard W.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Help with pg_loimport
2001-04-21 22:09 Help with pg_loimport Richard Whittaker <richard@connections.yk.ca>
@ 2001-04-22 12:31 ` Martín Marqués <martin@bugs.unl.edu.ar>
2001-04-22 18:44 ` Re: Help with pg_loimport Mitch Vincent <mitch@venux.net>
0 siblings, 1 reply; 3+ messages in thread
From: Martín Marqués @ 2001-04-22 12:31 UTC (permalink / raw)
To: Richard Whittaker <richard@connections.yk.ca>; pgsql-php
On Dom 22 Abr 2001 01:09, Richard Whittaker wrote:
> I posted this orignally on phpbuilder.net, but I also wanted to try here as
> well...
>
> Thanks kindly!
> Richard.
>
> Author: Richard Whittaker (199.247.236.117)
> Date: 2001-04-21 16:15:13
>
> Greetings:
>
> Does anyone have any examples of using the pg_loimport routines in PHP?...
>
> I have a requirement to be able to import a binary file (an image) into a
> table that has three columns.
>
> The first two columns are sequence integers, and the third is an OID
> column. I would like to be able, via my PHP script, to insert a new image,
> with the two integers, but I don't see any examples of this for PostGres
> and PHP... Is this possible to do at all?...
Oh please! If someone has a small example of how to do this, I think lots of
use will be gratefull!!!!!
Saludos... :-)
P.D.: I have send this question before, with no answer.
--
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques | mmarques@unl.edu.ar
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Help with pg_loimport
2001-04-21 22:09 Help with pg_loimport Richard Whittaker <richard@connections.yk.ca>
2001-04-22 12:31 ` Re: Help with pg_loimport Martín Marqués <martin@bugs.unl.edu.ar>
@ 2001-04-22 18:44 ` Mitch Vincent <mitch@venux.net>
0 siblings, 0 replies; 3+ messages in thread
From: Mitch Vincent @ 2001-04-22 18:44 UTC (permalink / raw)
To: pgsql-php
Is it not as straight forward as it looks? I've never used large objects in
PostgreSQL so I really don't know..
From the PHP manual :
>int pg_loimport (int file [, int connection_id])
>The filename argument specifies the pathname of the file to be imported as
a large object. Returns FALSE if an error occurred, object id of the just
created >large object otherwise. Remember that handling large objects in
PostgreSQL must happen inside a transaction.
Looks like file there is a file descriptor returned by fopen() [?] and the
connection ID is that of the PostgreSQL connection.. What happens when you
try it?
-Mitch
----- Original Message -----
From: "Martín Marqués" <martin@bugs.unl.edu.ar>
To: "Richard Whittaker" <richard@connections.yk.ca>;
<pgsql-php@postgresql.org>
Sent: Sunday, April 22, 2001 8:31 AM
Subject: Re: [PHP] Help with pg_loimport
> On Dom 22 Abr 2001 01:09, Richard Whittaker wrote:
> > I posted this orignally on phpbuilder.net, but I also wanted to try here
as
> > well...
> >
> > Thanks kindly!
> > Richard.
> >
> > Author: Richard Whittaker (199.247.236.117)
> > Date: 2001-04-21 16:15:13
> >
> > Greetings:
> >
> > Does anyone have any examples of using the pg_loimport routines in
PHP?...
> >
> > I have a requirement to be able to import a binary file (an image) into
a
> > table that has three columns.
> >
> > The first two columns are sequence integers, and the third is an OID
> > column. I would like to be able, via my PHP script, to insert a new
image,
> > with the two integers, but I don't see any examples of this for PostGres
> > and PHP... Is this possible to do at all?...
>
> Oh please! If someone has a small example of how to do this, I think lots
of
> use will be gratefull!!!!!
>
> Saludos... :-)
>
> P.D.: I have send this question before, with no answer.
>
> --
> El mejor sistema operativo es aquel que te da de comer.
> Cuida tu dieta.
> -----------------------------------------------------------------
> Martin Marques | mmarques@unl.edu.ar
> Programador, Administrador | Centro de Telematica
> Universidad Nacional
> del Litoral
> -----------------------------------------------------------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-04-22 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-21 22:09 Help with pg_loimport Richard Whittaker <richard@connections.yk.ca>
2001-04-22 12:31 ` Martín Marqués <martin@bugs.unl.edu.ar>
2001-04-22 18:44 ` Mitch Vincent <mitch@venux.net>
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