| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2009-02-04 18:31 UTC] matteo at beccati dot com
  [2009-02-11 10:44 UTC] felipe@php.net
  [2009-02-11 11:19 UTC] matteo at beccati dot com
  [2009-03-22 18:35 UTC] kalle@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 12:00:01 2025 UTC | 
Description: ------------ I was trying to investigate a test failure in the pdo_pgsql extension, namely the large_objects.phpt. The failure is caused by the fact that the LOB parameter is bound after calling execute, which seems to be unsupported. Moving the call to bindColumn() before execute() fixes the test. I've also tried to fix it, but no matter how hard I tried I couldn't find a suitable solution that also kept backwards compatibility (i.e. returning the large object OID as int if the parameter is not explicitly bound as PDO::PARAM_LOB). Therefore I think that the best solution would be to document such behaviour and fix the test accordingly. Note: it doesn't look like a duplicate of #40913, as mysql and sqlite do not seem to have custom code to retrieve data as a stream. Reproduce code: --------------- $stmt = $db->prepare("SELECT * from test"); $stmt->bindColumn('bloboid', $lob, PDO::PARAM_LOB); $stmt->execute(); $stmt->fetch(PDO::FETCH_ASSOC); var_dump(is_resource($lob)); $stmt = $db->prepare("SELECT * from test"); $stmt->execute(); $stmt->bindColumn('bloboid', $lob, PDO::PARAM_LOB); $stmt->fetch(PDO::FETCH_ASSOC); var_dump(is_resource($lob)); Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(true) bool(false)