Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk> writes:
> I have written a trigger in C, and during the course of this I
> discovered that the LOAD command in psql wasn't updating the object when
> I made a change and recompiled.
> As requested by Tom, here is an example of this behaviour. I have just
> added this as a function as it performs the same.
Thanks for the test case. Unfortunately it works fine here:
regression=# select testtrig();
INFO: This is a test trigger
ERROR: cannot display a value of type trigger
regression=# LOAD '/home/tgl/testtrigger';
LOAD
regression=# select testtrig();
INFO: This is a test trigger
INFO: Uncomment me and recompile for new message
ERROR: cannot display a value of type trigger
regression=#
This is on RHL 8.0 on i386. What platform are you using exactly?
BTW, the file as given dumps core for me, because you have
> extern Datum trigf(PG_FUNCTION_ARGS);
> PG_FUNCTION_INFO_V1(trigf);
> Datum testtrig(PG_FUNCTION_ARGS)
and the V1 macro needs to reference testtrig not trigf. However I do
not think this is related to the LOAD problem.
regards, tom lane