Re: LOAD not updating object in session - Mailing list pgsql-bugs

From Tom Lane
Subject Re: LOAD not updating object in session
Date
Msg-id 5441.1092760035@sss.pgh.pa.us
Whole thread Raw
In response to LOAD not updating object in session  (Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk>)
Responses Re: LOAD not updating object in session  (Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Graeme Hinchliffe
Date:
Subject: LOAD not updating object in session
Next
From: Graeme Hinchliffe
Date:
Subject: Re: LOAD not updating object in session