Re: Make default values bold in Synopsis / bnf diagram
"David G. Johnston" <[email protected]> Fri, 20 Dec 2019 14:18:18 -0700
| Newsgroups | gmane.comp.db.postgresql.devel.documentation |
|---|---|
| Message-ID | <CAKFQuwYLTvmcMPG55z=xCfknAUKAn2jdvE9EvRVHJmb9c08wSw@mail.gmail.com> |
--0000000000007deba1059a2938bb Content-Type: text/plain; charset="UTF-8" On Fri, Dec 20, 2019 at 1:56 PM Bruce Momjian <[email protected]> wrote: > On Mon, Dec 2, 2019 at 09:19:32PM +0000, PG Doc comments form wrote: > > > In this example the words to words "READ COMMITTED", "READ WRITE" should > be > > bold since they are default values if I execute the statement "BEGIN;" > see > > the example. > > Uh, I don't think we bold the defaults in the syntax, but if we wanted > to do that, we should do it everywhere. Is that something we want? I > am afraid it would just make the default values stand out, which seems > counter-productive. > I originally agreed with theoretically adding <em class="default"> to these but further evaluation below lessens its utility. > By the way I started in "BEGIN" but here the defaults was not even present > > sow I went to "START TRANSACTION but still no indication on default > values > > but finally in "SET TRANSACTION" > > There are default value for "ISOLATION LEVEL" but nothing on default > value > > for "READ WRITE | READ ONLY" or "[ NOT ] DEFERRABLE". > > Uh, I see in the BEGIN manual page: > > If the isolation level, read/write mode, or deferrable mode is > specified, the new transaction has those characteristics, as if SET > TRANSACTION (SET_TRANSACTION(7)) was executed. > > and in SET TRANSACTION: > > If the isolation level, read/write mode, or deferrable mode is > specified, the new transaction has those characteristics, as if SET > TRANSACTION (SET_TRANSACTION(7)) was executed. > > Is "has those characteristics" unclear? > > The OP is complaining about the "is not specified" situation. One complication here, which is noted on the SET TRANSACTION page, is: "The session default transaction modes can also be set by setting the configuration parameters default_transaction_isolation, default_transaction_read_only, and default_transaction_deferrable." So in fact the defaults we'd be highlighting would only be the ones that are shipped since the execution environment may have different defaults. My take-away is that while the OP may have a valid gripe regarding the documentation and how it presents transactions - learning about the defaults and how to change them - the proposed solution is neither particularly practical nor desirable given that what is default is not something that can be absolutely documented. It is obvious that transactions are not read only by default and defer-ability seldom comes up and in learning about it one does learn its typical default (not deferred). And there are numerous references when learning about transaction isolation that the shipped default is read committed. I don't see this single instance of confusion as a call for the developers to go find a better way to write/organize the documentation. Specific suggestions are welcome though this one I would say should be turned down. David J. --0000000000007deba1059a2938bb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:arial,helvetica,sans-serif"><span style=3D"font-family:Arial,Helve= tica,sans-serif">On Fri, Dec 20, 2019 at 1:56 PM Bruce Momjian <<a href= =3D"mailto:[email protected]">[email protected]</a>> wrote:</span><br></di= v></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex">On Mon, Dec=C2=A0 2, 2019 at 09:19:32PM +0000, PG Doc comments f= orm wrote:<br><br> > In this example the words to words "READ COMMITTED", "R= EAD WRITE" should be<br> > bold since they are default values if I execute the statement "BE= GIN;" see<br> > the example.<br> <br> Uh, I don't think we bold the defaults in the syntax, but if we wanted<= br> to do that, we should do it everywhere.=C2=A0 Is that something we want?=C2= =A0 I<br> am afraid it would just make the default values stand out, which seems<br> counter-productive.<br></blockquote><div><br></div><div><div class=3D"gmail= _default" style=3D"font-family:arial,helvetica,sans-serif">I originally agr= eed with theoretically adding <em class=3D"default"> to the= se but further evaluation below lessens its utility.</div><br></div><blockq= uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p= x solid rgb(204,204,204);padding-left:1ex"> > By the way I started in "BEGIN" but here the defaults was no= t even present<br> > sow I went to "START TRANSACTION but still no indication on defau= lt values<br> > but finally in "SET TRANSACTION"<br> > There are default value for "ISOLATION LEVEL" but nothing on= default value<br> > for "READ WRITE | READ ONLY" or=C2=A0 "[ NOT ] DEFERRAB= LE".<br> <br> Uh, I see in the BEGIN manual page:<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 If the isolation level, read/write mode, or def= errable mode is<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 specified, the new transaction has those charac= teristics, as if SET<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 TRANSACTION (SET_TRANSACTION(7)) was executed.<= br> <br> and in SET TRANSACTION:<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 If the isolation level, read/write mode, or def= errable mode is<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 specified, the new transaction has those charac= teristics, as if SET<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 TRANSACTION (SET_TRANSACTION(7)) was executed.<= br> <br> Is "has those characteristics" unclear?<br><br></blockquote><div>= <br></div><div class=3D"gmail_default" style=3D"font-family:arial,helvetica= ,sans-serif">The OP is complaining about the "is not specified" s= ituation.</div><div class=3D"gmail_default" style=3D"font-family:arial,helv= etica,sans-serif"><br></div><div class=3D"gmail_default" style=3D"font-fami= ly:arial,helvetica,sans-serif">One complication here, which is noted on the= SET TRANSACTION page, is:</div><div class=3D"gmail_default" style=3D"font-= family:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_default" s= tyle=3D"font-family:arial,helvetica,sans-serif">"The session default t= ransaction modes can also be set by setting the configuration parameters de= fault_transaction_isolation, default_transaction_read_only, and default_tra= nsaction_deferrable."<br></div><div class=3D"gmail_default" style=3D"f= ont-family:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_defaul= t" style=3D"font-family:arial,helvetica,sans-serif">So in fact the defaults= we'd be highlighting would only be the ones that are shipped since the= execution environment may have different defaults.</div><div class=3D"gmai= l_default" style=3D"font-family:arial,helvetica,sans-serif"><br></div><div = class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif">My= take-away is that while the OP may have a valid gripe regarding the docume= ntation and how it presents transactions - learning about the defaults and = how to change them - the proposed solution is neither particularly practica= l nor desirable given that what is default is not something that can be abs= olutely documented.</div><div class=3D"gmail_default" style=3D"font-family:= arial,helvetica,sans-serif"><br></div><div class=3D"gmail_default" style=3D= "font-family:arial,helvetica,sans-serif">It is obvious that transactions ar= e not read only by default and defer-ability seldom comes up and in learnin= g about it one does learn its typical default (not deferred).=C2=A0 And the= re are numerous references when learning about transaction isolation that t= he shipped default is read committed.=C2=A0 I don't see this single ins= tance of confusion as a call for the developers to go find a better way to = write/organize the documentation.=C2=A0 Specific suggestions are welcome th= ough this one I would say should be turned down.</div><div class=3D"gmail_d= efault" style=3D"font-family:arial,helvetica,sans-serif"><br></div><div cla= ss=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif">David= J.</div><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,= sans-serif"><br></div></div></div> --0000000000007deba1059a2938bb--