$ psql psql (9.3devel) Type "help" for help. testdb=# set debug_print_plan=1; SET testdb=# select 42; ?column? ---------- 42 (1 row) testdb=# \q 2012-10-30 23:57:03.757 CET 21837 LOG: plan: 2012-10-30 23:57:03.757 CET 21837 DETAIL: {PLANNEDSTMT :commandType 1 :queryId 0 :hasReturning false :hasModifyingCTE false :canSetTag true :transientPlan false :planTree {RESULT :startup_cost 0.00 :total_cost 0.01 :plan_rows 1 :plan_width 0 :targetlist ( {TARGETENTRY :expr {CONST :consttype 23 :consttypmod -1 :constcollid 0 :constlen 4 :constbyval true :constisnull false :location 7 :constvalue 4 [ 42 0 0 0 0 0 0 0 ] } :resno 1 :resname ?column? :ressortgroupref 0 :resorigtbl 0 :resorigcol 0 :resjunk false } ) :qual <> :lefttree <> :righttree <> :initPlan <> :extParam (b) :allParam (b) :resconstantqual <> } :rtable <> :resultRelations <> :utilityStmt <> :subplans <> :rewindPlanIDs (b) :rowMarks <> :relationOids <> :invalItems <> :nParamExec 0 } 2012-10-30 23:57:03.757 CET 21837 STATEMENT: select 42; ####