Skip site navigation (1) Skip section navigation (2)

New/old style trigger API

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: pgsql-hackers(at)PostgreSQL(dot)org
Subject: New/old style trigger API
Date: 2001-05-27 14:56:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
The docs seem a little sketchy but the source implies that there is
a difference between new and old style triggers.  I can't seem to find
this difference.  I tried following the only current example I could
find but I get a core dump.  Here is the backtrace.

#0  0x0 in ?? ()
#1  0x8136052 in fmgr_oldstyle (fcinfo=0xbfbfd134) at fmgr.c:433
#2  0x80b6b2d in ExecCallTriggerFunc (trigger=0x82ce030, trigdata=0xbfbfd1c8, 
    per_tuple_context=0x827acf0) at trigger.c:865
#3  0x80b6e15 in ExecBRUpdateTriggers (estate=0x82fbf50, tupleid=0xbfbfd264, 
    newtuple=0x83094a8) at trigger.c:1008
#4  0x80bcf3a in ExecReplace (slot=0x8308018, tupleid=0xbfbfd264, 
    estate=0x82fbf50) at execMain.c:1416
#5  0x80bcc82 in ExecutePlan (estate=0x82fbf50, plan=0x82fbec8, 
    operation=CMD_UPDATE, numberTuples=0, direction=ForwardScanDirection, 
    destfunc=0x83092f0) at execMain.c:1127
#6  0x80bc27b in ExecutorRun (queryDesc=0x8307cc0, estate=0x82fbf50, 
    feature=3, count=0) at execMain.c:233
#7  0x80ff29b in ProcessQuery (parsetree=0x82f6e20, plan=0x82fbec8, 
    dest=Remote) at pquery.c:277
#8  0x80fddd3 in pg_exec_query_string (
    query_string=0x82f6030 "UPDATE bgroup SET actypid = 1,ddate = NULL,edate = '2001-07-23',mail = '',ftp = '',dns = 'f',bname = 'jpsantos',bgdesc = '',isp = 'VEX',pdate = '2001-04-23',pmon = 5,bgroup_active = 't',sdate = '1999-"..., 
    dest=Remote, parse_context=0x827a720) at postgres.c:808
#9  0x80fedd1 in PostgresMain (argc=4, argv=0xbfbfd4c8, real_argc=9, 
    real_argv=0xbfbfdc54, username=0x826325d "darcy") at postgres.c:1905
#10 0x80ea2ad in DoBackend (port=0x8263000) at postmaster.c:2114
#11 0x80e9eb2 in BackendStartup (port=0x8263000) at postmaster.c:1897
#12 0x80e91aa in ServerLoop () at postmaster.c:995
#13 0x80e8b7c in PostmasterMain (argc=9, argv=0xbfbfdc54) at postmaster.c:685
#14 0x80caff4 in main (argc=9, argv=0xbfbfdc54) at main.c:175
#15 0x806bc81 in ___start ()

It gets to fmgr_oldstyle() and then dies from a jump to a null pointer.
Can someone please tell me how to make my function a newstyle one.  I
will update the docs once I have it working.

D'Arcy J.M. Cain <darcy(at){druid|vex}.net>   |  Democracy is three wolves                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date

Next:From: Domingo Alvarez DuarteDate: 2001-05-27 17:00:37
Subject: maybe a bug in plpgsql, nulls and empty strings are not the same
Previous:From: Hiroshi InoueDate: 2001-05-27 08:32:54
Subject: RE: Plans for solving the VACUUM problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group