php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16953 problem with "bytea" column
Submitted: 2002-05-01 17:11 UTC Modified: 2002-05-03 17:13 UTC
From: stach at toya dot net dot pl Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 4.2.0 OS: Win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stach at toya dot net dot pl
New email:
PHP Version: OS:

 

 [2002-05-01 17:11 UTC] stach at toya dot net dot pl
Apache 1.3.24 on Win32 (Win 2000), php installed as module.
PostgreSQL 7.2.1 on Linux (Debian).
When trying to select data from a column of type "bytea"
with query "select encode(zdjecie, 'base64') as zdjecie" from php, I get the following error:
pg_exec() query failed: pqReadData() -- read() failed: errno=0 No error
However, the same code works well (on the same database), when called from php 4.1.2 apache 1.3.24 on Linux (Debian).
Error reporting is set to E_ALL & ~E_NOTICE.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-02 10:14 UTC] yohgaki@php.net
I think this is PostgreSQL problem under Windows.
You are better to ask to PostgreSQL windwos users/developers.
 [2002-05-02 10:35 UTC] yohgaki@php.net
BTW, bytea is _very_ slow compare to large object. 
Bytea could be 40, 50 times slower than lo. AND PHP pgsql module does not provide decode function when you select bytea. This makes slower.

I suggest to wait PostgreSQL 7.3 and PHP supports it or use lo now.

 [2002-05-03 17:13 UTC] stach at toya dot net dot pl
Just FYI, in PostgreSQL 7.2.1 large objects are
implemented using a **bytea** column in system table
pg_largeobject. And they don't work either, of course.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 06 12:01:28 2024 UTC