PostgreSQL -> PHP problem - Mailing list pgsql-hackers

From Mitch Vincent
Subject PostgreSQL -> PHP problem
Date
Msg-id 016801c08fa0$6eab18e0$0200000a@windows
Whole thread Raw
List pgsql-hackers
This is the debug output for the last query that seems to be throwing PHP
into a fit (a fit that somehow closes the backend connection - note, it
doesn't crash, it just closes)..

I don't think anything is going on here that shouldn't be, it looks the same
as any other query that succeeds.. I just wanted someone that could actually
read and understand this to take a look..

Thanks!

Debug output follows ---


ProcessQuery
CommitTransactionCommand
StartTransactionCommand
query: SELECT * FROM app_degrees
parser outputs:

{ QUERY :command 1  :utility <> :resultRelation 0 :into <> :isPortal false
:isBinary false :isTemp false :unionall false :distinctClause <> :sortClause
<> :rtable ({ RTE :relname app_degrees :ref { ATTR :relname app_degrees
:attrs <>} :relid 660864 :inh false :inFromCl true :inJoinSet true :skipAcl
false}) :targetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23
:restypmod -1 :resname degree_id :reskey 0 :reskeyop 0 :ressortgroupref 0
:resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1
:varlevelsup 0 :varnoold 1 :varoattno 1}} { TARGETENTRY :resdom { RESDOM
:resno 2 :restype 1043 :restypmod 14 :resname abbr :reskey 0 :reskeyop 0
:ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 2
:vartype 1043 :vartypmod 14  :varlevelsup 0 :varnoold 1 :varoattno 2}} {
TARGETENTRY :resdom { RESDOM :resno 3 :restype 1043 :restypmod 54 :resname
description :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr
{ VAR :varno 1 :varattno 3 :vartype 1043 :vartypmod 54  :varlevelsup 0
:varnoold 1 :varoattno 3}}) :qual <> :groupClause <> :havingQual <> :hasAggs
false :hasSubLinks false :unionClause <> :intersectClause <> :limitOffset <>
:limitCount <> :rowMark <>}

after rewriting:
{ QUERY  :command 1  :utility <>  :resultRelation 0  :into <>  :isPortal false  :isBinary false  :isTemp false
:unionallfalse  :distinctClause <>  :sortClause <>  :rtable (     { RTE     :relname app_degrees     :ref        { ATTR
      :relname app_degrees        :attrs <>        }
 
     :relid 660864     :inh false     :inFromCl true     :inJoinSet true     :skipAcl false     }  )
  :targetlist (     { TARGETENTRY     :resdom        { RESDOM        :resno 1        :restype 23        :restypmod -1
    :resname degree_id        :reskey 0        :reskeyop 0        :ressortgroupref 0        :resjunk false        }
 
     :expr        { VAR        :varno 1        :varattno 1        :vartype 23        :vartypmod -1        :varlevelsup
0       :varnoold 1        :varoattno 1        }     }
 
     { TARGETENTRY     :resdom        { RESDOM        :resno 2        :restype 1043        :restypmod 14
:resnameabbr        :reskey 0        :reskeyop 0        :ressortgroupref 0        :resjunk false        }
 
     :expr        { VAR        :varno 1        :varattno 2        :vartype 1043        :vartypmod 14
:varlevelsup0        :varnoold 1        :varoattno 2        }     }
 
     { TARGETENTRY     :resdom        { RESDOM        :resno 3        :restype 1043        :restypmod 54
:resnamedescription        :reskey 0        :reskeyop 0        :ressortgroupref 0        :resjunk false        }
 
     :expr        { VAR        :varno 1        :varattno 3        :vartype 1043        :vartypmod 54
:varlevelsup0        :varnoold 1        :varoattno 3        }     }  )
 
  :qual <>  :groupClause <>  :havingQual <>  :hasAggs false  :hasSubLinks false  :unionClause <>  :intersectClause <>
:limitOffset<>  :limitCount <>  :rowMark <>  }
 

plan:

{ SEQSCAN :startup_cost 0.00 :total_cost 20.00 :rows 1000 :width 28 :state
<> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23
:restypmod -1 :resname degree_id :reskey 0 :reskeyop 0 :ressortgroupref 0
:resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1
:varlevelsup 0 :varnoold 1 :varoattno 1}} { TARGETENTRY :resdom { RESDOM
:resno 2 :restype 1043 :restypmod 14 :resname abbr :reskey 0 :reskeyop 0
:ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 2
:vartype 1043 :vartypmod 14  :varlevelsup 0 :varnoold 1 :varoattno 2}} {
TARGETENTRY :resdom { RESDOM :resno 3 :restype 1043 :restypmod 54 :resname
description :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr
{ VAR :varno 1 :varattno 3 :vartype 1043 :vartypmod 54  :varlevelsup 0
:varnoold 1 :varoattno 3}}) :qpqual <> :lefttree <> :righttree <> :extprm ()
:locprm () :initplan <> :nprm 0  :scanrelid 1 }

ProcessQuery
CommitTransactionCommand
proc_exit(0)
shmem_exit(0)
exit(0)
/usr/local/pgsql/bin/postmaster: reaping dead processes...
/usr/local/pgsql/bin/postmaster: CleanupProc: pid 45155 exited with status 0







pgsql-hackers by date:

Previous
From: "Michal Maru¹ka"
Date:
Subject: src/bin/psql/tab-complete.c ported to emacs lisp
Next
From: "Dan Wilson"
Date:
Subject: Re: [GENERAL] Re: grant privileges to a database