Received: from smtp.ualg.pt (smtp.ualg.pt [193.136.224.8]) by postgresql.org (Postfix) with ESMTP id D394F476198 for ; Wed, 13 Mar 2002 06:57:01 -0500 (EST) Received: from localhost (smtp.ualg.pt [127.0.0.1]) by smtp.ualg.pt (Postfix) with ESMTP id 2D8F74BB7B for ; Wed, 13 Mar 2002 11:57:03 +0000 (WET) Received: from ualg.pt (unknown [193.136.228.15]) by smtp.ualg.pt (Postfix) with ESMTP id 519284BBDC for ; Wed, 13 Mar 2002 11:57:01 +0000 (WET) Message-ID: <3C8F3E8C.E3711262@ualg.pt> Date: Wed, 13 Mar 2002 11:57:00 +0000 From: =?iso-8859-1?Q?Lu=EDs?= Martins X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: Problems with large objects Content-Type: multipart/alternative; boundary="------------2F5803A4D6FFEB5502BB9A33" X-Virus-Scanned: by AMaViS snapshot-20010714 X-Archive-Number: 200203/11 X-Sequence-Number: 980 --------------2F5803A4D6FFEB5502BB9A33 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 --------------2F5803A4D6FFEB5502BB9A33 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit   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
  --------------2F5803A4D6FFEB5502BB9A33--