Обсуждение: What does RIR as in fireRIRrules stand for?
Hi, I searched the current code, all diffs to the current code, and the mailing list, but still haven't got an actual clue what RIR is supposed to stand for. There's a few things that come to mind (Rewrite Instead Rule?), but none of them seem to make too much sense. Greetings, Andres Freund
<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Pure speculation but the word firemakes me think of triggers, not rule. Fire Referential Integrity Rules (Triggers)?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br/></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">DavidJ.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br/></div></div><div class="gmail_extra"><br /><div class="gmail_quote">OnThu, Aug 27, 2015 at 9:13 AM, Andres Freund <span dir="ltr"><<a href="mailto:andres@anarazel.de"target="_blank">andres@anarazel.de</a>></span> wrote:<br /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br /><br /> I searched the currentcode, all diffs to the current code, and the<br /> mailing list, but still haven't got an actual clue what RIR issupposed<br /> to stand for. There's a few things that come to mind (Rewrite Instead<br /> Rule?), but none of them seemto make too much sense.<br /><br /> Greetings,<br /><br /> Andres Freund<br /><span class="HOEnZb"><font color="#888888"><br/><br /> --<br /> Sent via pgsql-hackers mailing list (<a href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br/> To make changes to your subscription:<br/><a href="http://www.postgresql.org/mailpref/pgsql-hackers" rel="noreferrer" target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/></font></span></blockquote></div><br /></div>
Andres Freund <andres@anarazel.de> writes: > I searched the current code, all diffs to the current code, and the > mailing list, but still haven't got an actual clue what RIR is supposed > to stand for. There's a few things that come to mind (Rewrite Instead > Rule?), but none of them seem to make too much sense. http://www.postgresql.org/message-id/3E887762.5B68F64B@Yahoo.com regards, tom lane
On 2015-08-27 15:13:52 +0200, Andres Freund wrote: > I searched the current code, all diffs to the current code, and the > mailing list, but still haven't got an actual clue what RIR is supposed > to stand for. There's a few things that come to mind (Rewrite Instead > Rule?), but none of them seem to make too much sense. Looking over the original submission it seems to actually stand for retrieve-instead-retrieve (as somebody on IRC guessed). Doesn't seem to make much sense to me. The explanation seems to have been removed way back, in f93b6974 . Greetings, Andres Freund
On 2015-08-27 09:43:09 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > I searched the current code, all diffs to the current code, and the > > mailing list, but still haven't got an actual clue what RIR is supposed > > to stand for. There's a few things that come to mind (Rewrite Instead > > Rule?), but none of them seem to make too much sense. > > http://www.postgresql.org/message-id/3E887762.5B68F64B@Yahoo.com Oops. I saw that message but thought, based on the subject, it'd a scam mail... Can we either add a comment to the effect of Jan's message, or just renamoe the functions/variables? Greetings, Andres Freund PS: The sources taught me something today: reality is for dead birds -- glass
Andres Freund <andres@anarazel.de> writes: > On 2015-08-27 09:43:09 -0400, Tom Lane wrote: >> http://www.postgresql.org/message-id/3E887762.5B68F64B@Yahoo.com > Oops. I saw that message but thought, based on the subject, it'd a scam > mail... > Can we either add a comment to the effect of Jan's message, or just > renamoe the functions/variables? Let's add a comment. regards, tom lane
Candidate for Appendix K?
Cheers,
Steve
On Thu, Aug 27, 2015 at 6:52 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andres Freund <andres@anarazel.de> writes:
> On 2015-08-27 09:43:09 -0400, Tom Lane wrote:
>> http://www.postgresql.org/message-id/3E887762.5B68F64B@Yahoo.com
> Oops. I saw that message but thought, based on the subject, it'd a scam
> mail...
> Can we either add a comment to the effect of Jan's message, or just
> renamoe the functions/variables?
Let's add a comment.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Steve Crawford <scrawford@pinpointresearch.com> writes: > Candidate for Appendix K? Meh ... it's not a user-visible notation, in fact it only appears in rewriteHandler.c AFAICS. I think an explanation in fireRIRrules' header comment would be fine. regards, tom lane
On 2015-08-27 11:12:42 -0400, Tom Lane wrote: > Steve Crawford <scrawford@pinpointresearch.com> writes: > > Candidate for Appendix K? > > Meh ... it's not a user-visible notation, in fact it only appears in > rewriteHandler.c AFAICS. Agreed, I don't think we want to distribute that term any wider than that file. > I think an explanation in fireRIRrules' header comment would be fine. I was thinking of adding it to the file's header like* NOTES* Some of the terms used in this file are of historic nature:"retrieve"* was the PostQUEL keyword for what today is SELECT. "RIR" stands for* "Retrieve-Instead-Retrieve",that is an ON SELECT INSTEAD rule (which* has to be unconditional and where only one rulecan exist on each* relation). since both retrieve and RIR are used in a bunch of places. Andres
Andres Freund <andres@anarazel.de> writes: > On 2015-08-27 11:12:42 -0400, Tom Lane wrote: >> I think an explanation in fireRIRrules' header comment would be fine. > I was thinking of adding it to the file's header like > * NOTES > * Some of the terms used in this file are of historic nature: "retrieve" > * was the PostQUEL keyword for what today is SELECT. "RIR" stands for > * "Retrieve-Instead-Retrieve", that is an ON SELECT INSTEAD rule (which > * has to be unconditional and where only one rule can exist on each > * relation). > since both retrieve and RIR are used in a bunch of places. Seems reasonable. Maybe worth writing out the modern spelling a bit further, "an ON SELECT DO INSTEAD SELECT rule", to make the parallel to Retrieve-Instead-Retrieve perfectly clear. regards, tom lane
On 2015-08-28 10:20:58 -0400, Tom Lane wrote: > Seems reasonable. Maybe worth writing out the modern spelling a bit > further, "an ON SELECT DO INSTEAD SELECT rule", to make the parallel > to Retrieve-Instead-Retrieve perfectly clear. Makes sense. Pushed that way. Thanks
I found this thread when trying to understand what RIR means in the source code. The explanation by Andres (which I find informative) is not in the code. Should we add it into the comment? I think it will be useful for readability.
Best,
Yue
On Mon, Jan 3, 2022 at 5:26 PM Andres Freund <andres@anarazel.de> wrote:
On 2015-08-27 15:13:52 +0200, Andres Freund wrote:
> I searched the current code, all diffs to the current code, and the
> mailing list, but still haven't got an actual clue what RIR is supposed
> to stand for. There's a few things that come to mind (Rewrite Instead
> Rule?), but none of them seem to make too much sense.
Looking over the original submission it seems to actually stand for
retrieve-instead-retrieve (as somebody on IRC guessed). Doesn't seem to
make much sense to me.
The explanation seems to have been removed way back, in f93b6974 .
Greetings,
Andres Freund
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
fred yin <legendmakeryy@gmail.com> writes: > I found this thread when trying to understand what RIR means in the source > code. The explanation by Andres (which I find informative) is not in the > code. Should we add it into the comment? I think it will be useful for > readability. There's this at the top of rewriteHandler.c: * NOTES * Some of the terms used in this file are of historic nature: "retrieve" * was the PostQUEL keyword for what today is SELECT. "RIR" stands for * "Retrieve-Instead-Retrieve", that is an ON SELECT DO INSTEAD SELECT rule * (which has to be unconditional and where only one rule can exist on each * relation). regards, tom lane