Re: Docs patch to note that rules only get run once per query.
От | Sean Reifschneider |
---|---|
Тема | Re: Docs patch to note that rules only get run once per query. |
Дата | |
Msg-id | 20030414175325.GK7507@tummy.com обсуждение исходный текст |
Ответ на | Re: Docs patch to note that rules only get run once per query. (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-docs |
On Mon, Apr 14, 2003 at 06:38:16PM +0200, Peter Eisentraut wrote: >This can't possibly be true. Rules are never invoked "after" any deletion >of any row. Take a close look at the examples of update rules in the I'm open to you suggesting a different way of saying the above. I understand that rules aren't really invoked, but that's what I came up with to describe what I was seeing. After a review of my SQL, I made a post to the bugs list about it and the only reply I got was that the problem I was seeing was due to rules only doing their thing once per query. In my case, it seemed like the rule SQL was being executed after the first deletion. This worked fine if I was doing a single deletion, but would muck things up if I was doing a multi-column deletion. A full description including a sample of how to reproduce it is in my original bugs posting, available at: http://archives.postgresql.org/pgsql-bugs/2003-03/msg00098.php >The rule will expand your initial command to a big and ugly set of >commands. But all those commands are applied like any normal command that >you could have entered by hand. So if too few or too many rows are >affected, that's because of the conditions attached to the command. I would welcome a solution. I tried a number of different mechanisms for doing the updates I want using rules, but wasn't able to find one that would do the right thing. Thanks, Sean -- The question of whether a computer can think is no more interesting than the question of whether a submarine can swim." -- Edsgar W. Dijkstra (1930-2002) Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com> tummy.com, ltd. - Linux Consulting since 1995. Qmail, Python, SysAdmin
В списке pgsql-docs по дате отправления: