Search Postgresql Archives

Re: rule creating infinite recursion not sure why

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gene <genekhart@xxxxxxxxx> writes:
> I'm not sure why it's detecting recursion in this case when the rule
> conditional should be false

Rules are macros, which means that expansion has to terminate
statically, not dynamically.  For the particular purpose you seem to
have here, it'd be a lot more manageable and a lot more efficient
to use a BEFORE UPDATE trigger instead of a rule.

	if new.pattern <> old.pattern then
		new.flag = false;
	end if;
	return new;

Or are you trying to change some other row than the one being updated?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux