Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Schema/Trig...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3103 of 3163
Post > Topic >>

Re: Schema/Trigger help

by tgl@[EMAIL PROTECTED] (Tom Lane) May 5, 2008 at 10:08 AM

"Cody Konior" <cody.konior@[EMAIL PROTECTED]
> writes:
> I've pasted the whole thing because I don't know how much is im****tant. 
The
> problem is that it seems whenever we do the INSERT, the trigger causes
an
> error because it says parts_purchasing table doesn't exist. 
Naturally... it
> does exist!

The three standard answers for this type of problem are:

1. case-folding mismatch (you quoted a mixed-case name when creating the
table and tried to reference it without quotes, or vice versa);

2. wrong schema search path;

3. obsolete cached plan.

It sounds like you already eliminated #2, and if the entire example is
shown exactly then it's not #1 either.  #3 could be eliminated by
starting a fresh database session.

The real question in my mind is how this code could've ever worked at
all, though.  The trigger creates a fresh update event (maybe more than
one) on its own table every time through, which will fire the same
trigger again, which means that this absolutely *should* be an infinite
loop.  The only way it isn't is if the "parts_purchasing" table affected
by its UPDATE isn't the same one the trigger itself is attached to.
So I'm thinking there probably is a schema search path issue hidden
in here somewhere, but you've not given us enough information to
understand what is supposed to be happening.

			regards, tom lane

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 1 Posts in Topic:
Re: Schema/Trigger help
tgl@[EMAIL PROTECTED] (T  2008-05-05 10:08:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Tue Jul 8 23:54:47 CDT 2008.