473,750 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rules question

I am starting to work with rules. I think I have them down but the
folowing one is giving me grief. It tells me that it has rewritten 100
times and probably has looped. The columns ID and Location make up the
primary key so I am sure that the result update should only effect one
row. Anyone know what I am missing?

CREATE OR REPLACE RULE "set_change d" AS ON UPDATE TO "GameInformatio n"
WHERE NEW."Changed" =FALSE DO UPDATE "GameInformatio n" SET "Changed" = TRUE
WHERE "Location" = NEW."Location" AND "ID" = NEW."ID";

--- Adam Kavan
--- ak****@cox.net
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #1
1 1131

On Mon, 15 Sep 2003, Adam Kavan wrote:
I am starting to work with rules. I think I have them down but the
folowing one is giving me grief. It tells me that it has rewritten 100
times and probably has looped. The columns ID and Location make up the
primary key so I am sure that the result update should only effect one
row. Anyone know what I am missing?


Rules are like a macro system, you can't generally get around loops by
using where conditions on the rule. You'll need to either break the
recursion by using something like a view or write the logic into a
before trigger.

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

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2853
by: Mike | last post by:
Note: My XML experience to date has (unfortunately) been limited to reading and thinking, rather than implementation. Anyway, I am in the process of trying to figure out the most efficient way to validate and transform some very large (potentially over 100MB) XML documents. This is related to another question I will post next, but for now, I want to focus on one particular topic. The data in question has particular business rules...
4
8406
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties in JavaScript/JScript and HTML/XML elements. Without trying to get famous :-) but thinking it would be interesting to others I decided to post the following summary: 1. Variable names in JavaScript/JScript
6
2329
by: Richard Barnet | last post by:
Dear CSS gurus, My question regarding 'the cascade' is a simple one, but one that I haven't heard anyone talk about before: When cascading (for instance, when applying two linked stylesheets), does the whole selector definition supercede and replace a previous one, or does it go through the selector definition line by line (rule by rule) and only supercede rules and attributes that are previously defined?
0
1450
by: Mujdat Pakkan | last post by:
We have an interesting case where we want to use Postgres both as a database and a front end to a proprietary database. For the latter, we wrote functions that access the proprietary database. Then we defined views on the proprietary database and wrote rules for insert/update/delete on those views using the functions. The problem is that we cannot find a way to return reasonable error values from the access functions. The rules always...
20
3760
by: nicolas.riesch | last post by:
I try to understand strict aliasing rules that are in the C Standard. As gcc applies these rules by default, I just want to be sure to understand fully this issue. For questions (1), (2) and (3), I think that the answers are all "yes", but I would be glad to have strong confirmation. About questions (4), (5) and (6), I really don't know. Please help ! ! !
6
1750
by: hdante | last post by:
Out of curiosity, where are the group rules ? I ask so, because people are usually dismissed, by saying that something "is not standard". Thanks, Henrique Dante de Almeida
5
1537
by: sck10 | last post by:
Hello, I need to create a Business Rules table that can be pulled into the web page and use it as criteria for who should receive the approval email. For example, I have created a travel request form that ask a series of questions: TravelType: Domestic or International VisitType: (Customer, Internal Meeting, Seminar) TravelCost
10
1997
by: Old Wolf | last post by:
Consider the following program: #include <stdio.h> int main(void) { /* using malloc to eliminate alignment worries */ unsigned long *p = malloc( sizeof *p ); if ( p && sizeof(long) == sizeof(int) )
7
5048
by: somenath | last post by:
Hi All, I am trying to undestand "Type Conversions" from K&R book.I am not able to understand the bellow mentioned text "Conversion rules are more complicated when unsigned operands are involved. The problem is that comparisons between signed and unsigned values are machine- dependent, because they depend on the sizes of the various integer types. For example, suppose that int is 16 bits
8
1250
by: Andy B | last post by:
Before I do a no no on a newsgroup, I need to ask a question: What is the max number of lines of code you can/should post here before it gets too long?
0
8839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9584
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9397
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9257
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8264
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6810
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4716
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4893
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.