dbTalk Databases Forums  

Re: [BUGS] LOAD not updating object in session

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] LOAD not updating object in session in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Graeme Hinchliffe
 
Posts: n/a

Default Re: [BUGS] LOAD not updating object in session - 08-17-2004 , 11:34 AM






On Tue, 2004-08-17 at 17:27, Tom Lane wrote:
Quote:
Graeme Hinchliffe <graeme.hinchliffe (AT) zeninternet (DOT) 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:
damn (but in a good way)


Quote:
This is on RHL 8.0 on i386. What platform are you using exactly?
This is RH 9.0 on i386 from RPM's

Quote:
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)
oops! In the original I did have my function named as trigf, but I
changed that so as not to conflict with the other function in my db

Quote:
and the V1 macro needs to reference testtrig not trigf. However I do
not think this is related to the LOAD problem.
It didn't dump core for me, it was quite happy I would guess because
I have a function called trigf loaded in memory?

Do you have any ideas what I am doing or what I have set wrong?

--
-----
Graeme Hinchliffe (BSc)
Core Internet Systems Designer
Zen Internet (http://www.zen.co.uk/)

Direct: 0845 058 9074
Main : 0845 058 9000
Fax : 0845 058 9005



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

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] LOAD not updating object in session - 08-17-2004 , 11:49 AM






Graeme Hinchliffe <graeme.hinchliffe (AT) zeninternet (DOT) co.uk> writes:
Quote:
It didn't dump core for me, it was quite happy I would guess because
I have a function called trigf loaded in memory?
No; the lack of a V1 macro referencing testtrig would definitely cause
the backend to call testtrig using V0 conventions, in other words fcinfo
will not be passed. It could be that the indirection through a garbage
value of fcinfo happens to land on valid memory in your compilation.
(I did not get a core dump either when compiling on HPUX, but I have not
bothered to chase down why not.)

I don't know of any reason for RHL 9 to work differently from RHL 8 in
this regard. Can anyone else duplicate the problem?

BTW, given the testtrig/trigf confusion ... is it possible you were
LOADing the wrong file?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.