Discussion:
PL/pgSQL
(too old to reply)
Tuttle, Gene
2004-06-30 13:58:57 UTC
Permalink
I am not able to run any user created functions.

Thanks for your help. Gene Tuttle.

Postgres 7.4
Redhat 9

Debug output:



DEBUG: StartTransactionCommand
LOG: statement: select my_factorial(1);
DEBUG: parse tree:
DETAIL: {QUERY :commandType 1 :querySource 0 :canSetTag true :utilityStmt
<>
:resultRelation 0 :into <> :hasAggs false :hasSubLinks false :rtable
<>
:jointree {FROMEXPR :fromlist <> :quals <>} :rowMarks () :targetList
({TARGETENTRY :resdom {RESDOM :resno 1 :restype 23 :restypmod -1
:resname
my_factorial :ressortgroupref 0 :resorigtbl 0 :resorigcol 0 :resjunk
false}
:expr {FUNCEXPR :funcid 34208 :funcresulttype 23 :funcretset false
:funcformat
0 :args ({CONST :consttype 23 :constlen 4 :constbyval true
:constisnull false
:constvalue 4 [ 1 0 0 0 ]})}}) :groupClause <> :havingQual <>
:distinctClause
<> :sortClause <> :limitOffset <> :limitCount <> :setOperations <>
:resultRelations ()}

DEBUG: rewritten parse tree:
DETAIL: ({QUERY :commandType 1 :querySource 0 :canSetTag true :utilityStmt
<>
:resultRelation 0 :into <> :hasAggs false :hasSubLinks false :rtable
<>
:jointree {FROMEXPR :fromlist <> :quals <>} :rowMarks () :targetList
({TARGETENTRY :resdom {RESDOM :resno 1 :restype 23 :restypmod -1
:resname
my_factorial :ressortgroupref 0 :resorigtbl 0 :resorigcol 0 :resjunk
false}
:expr {FUNCEXPR :funcid 34208 :funcresulttype 23 :funcretset false
:funcformat
0 :args ({CONST :consttype 23 :constlen 4 :constbyval true
:constisnull false
:constvalue 4 [ 1 0 0 0 ]})}}) :groupClause <> :havingQual <>
:distinctClause
<> :sortClause <> :limitOffset <> :limitCount <> :setOperations <>
:resultRelations ()})

DEBUG: plan:
DETAIL: {RESULT :startup_cost 0.00 :total_cost 0.01 :plan_rows 1
:plan_width 0
:targetlist ({TARGETENTRY :resdom {RESDOM :resno 1 :restype 23
:restypmod -1
:resname my_factorial :ressortgroupref 0 :resorigtbl 0 :resorigcol 0
:resjunk
false} :expr {FUNCEXPR :funcid 34208 :funcresulttype 23 :funcretset
false
:funcformat 0 :args ({CONST :consttype 23 :constlen 4 :constbyval
true
:constisnull false :constvalue 4 [ 1 0 0 0 ]})}}) :qual <> :lefttree
<>
:righttree <> :initPlan <> :extParam () :allParam () :nParamExec 0
:resconstantqual <>}

DEBUG: PortalRun
DEBUG: reaping dead processes
DEBUG: child process (PID 28036) was terminated by signal 11
LOG: server process (PID 28036) was terminated by signal 11
LOG: terminating any other active server processes
LOG: all server processes terminated; reinitializing
DEBUG: shmem_exit(0)
DEBUG: invoking IpcMemoryCreate(size=10436608)
LOG: database system was interrupted at 2004-06-30 08:33:40 CDT
LOG: checkpoint record is at 0/1534858
LOG: redo record is at 0/1534858; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 16669; next OID: 42400
LOG: database system was not properly shut down; automatic recovery in
progress
FATAL: the database system is starting up
DEBUG: proc_exit(0)
DEBUG: shmem_exit(0)
DEBUG: exit(0)
DEBUG: forked new backend, pid=28039 socket=8
DEBUG: reaping dead processes
DEBUG: child process (PID 28039) exited with exit code 0
LOG: record with zero length at 0/1534898
LOG: redo is not required
LOG: database system is ready
DEBUG: proc_exit(0)
DEBUG: shmem_exit(0)
DEBUG: exit(0)
DEBUG: reaping dead processes

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Tom Lane
2004-06-30 16:03:58 UTC
Permalink
Post by Tuttle, Gene
I am not able to run any user created functions.
[ plpgsql dumps core ]
My bet would be that you have a plpgsql.so library that is mismatched
with your postgres server. It's fairly easy to get into such situations
if you've upgraded your PG version, or made a custom PG installation
without being careful to get rid of the one that comes preinstalled.
You didn't give enough details to say exactly what to do to fix it, though.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly

Loading...