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

Re: LOAD not updating object in session

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Graeme Hinchliffe <graeme(dot)hinchliffe(at)zeninternet(dot)co(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: LOAD not updating object in session
Date: 2004-08-17 16:27:15
Message-ID: 5441.1092760035@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Graeme Hinchliffe <graeme(dot)hinchliffe(at)zeninternet(dot)co(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Graeme HinchliffeDate: 2004-08-17 16:29:39
Subject: Re: LOAD not updating object in session
Previous:From: Graeme HinchliffeDate: 2004-08-17 15:48:59
Subject: LOAD not updating object in session

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