From: Luís Martins <lmar@ualg.pt>
To: pgsql-php@postgresql.org
Subject: Problems with large objects
Date: Wed, 13 Mar 2002 11:57:00 +0000
Message-ID: <3C8F3E8C.E3711262@ualg.pt> (raw)
Hi there, I am having a REAL problem with large objects. I insert them
into the database, with no problems, but when it is time of reading (the
large object is a PDF file) I have a file with a carriage return at the
end, so, I get corrupted data !
The code I use is this:
> $paper_row = pg_Fetch_row($paper, 0);
> @pg_Exec($conn,"begin");
> $image_oid=$paper_row[0];
> $fh=@pg_loopen($conn,$image_oid,"r");
> @pg_loreadall($fh);
> @Pg_loClose ($fh);
> @pg_exec("commit");
>
Thanks for your attention.
Best regards.
--
Luis Martins
Eng. Sistemas e Computacao
Servicos de Informatica
Universidade do Algarve
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: lmar@ualg.pt
Subject: Re: Problems with large objects
In-Reply-To: <3C8F3E8C.E3711262@ualg.pt>
References: <3C8F3E8C.E3711262@ualg.pt>
* 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