Thread: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Bruce Momjian - CVS
Date:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    momjian@hub.org    01/03/22 01:16:21

Modified files:
    contrib/pg_dumplo: lo_export.c lo_import.c main.c
    src/backend/access/common: heaptuple.c indextuple.c printtup.c
                               tupdesc.c
    src/backend/access/heap: heapam.c hio.c stats.c tuptoaster.c
    src/backend/access/index: indexam.c
    src/backend/access/nbtree: nbtsearch.c
    src/backend/access/transam: transam.c transsup.c xact.c
    src/backend/bootstrap: bootstrap.c
    src/backend/catalog: heap.c index.c pg_operator.c pg_proc.c
                         pg_type.c
    src/backend/commands: analyze.c command.c copy.c creatinh.c
                          define.c indexcmds.c proclang.c trigger.c
                          user.c
    src/backend/commands/_deadcode: recipe.c
    src/backend/executor: execAmi.c execJunk.c execProcnode.c
                          execScan.c execTuples.c execUtils.c
                          functions.c nodeAgg.c nodeAppend.c
                          nodeGroup.c nodeHash.c nodeHashjoin.c
                          nodeIndexscan.c nodeLimit.c nodeMaterial.c
                          nodeMergejoin.c nodeNestloop.c
                          nodeResult.c nodeSeqscan.c nodeSetOp.c
                          nodeSort.c nodeSubqueryscan.c
                          nodeTidscan.c nodeUnique.c
    src/backend/executor/_deadcode: nodeTee.c
    src/backend/lib: stringinfo.c
    src/backend/nodes: copyfuncs.c
    src/backend/optimizer/path: pathkeys.c
    src/backend/optimizer/path/_deadcode: predmig.c xfunc.c
    src/backend/parser: analyze.c parse_clause.c
    src/backend/rewrite: rewriteDefine.c rewriteHandler.c
    src/backend/storage/ipc: ipc.c
    src/backend/storage/lmgr: proc.c
    src/backend/tcop: dest.c fastpath.c postgres.c pquery.c
                      utility.c
    src/backend/tioga: tgRecipe.h
    src/backend/utils/adt: ascii.c formatting.c numeric.c
                           pg_lzcompress.c ri_triggers.c ruleutils.c
    src/backend/utils/init: postinit.c
    src/backend/utils/misc: database.c
    src/include/access: strat.h
    src/include/nodes: nodes.h
    src/include/port: osf.h
    src/interfaces/ecpg/include: sqlca.h
    src/interfaces/libpq: fe-connect.c fe-lobj.c pqexpbuffer.c
    src/interfaces/odbc: dlg_specific.c drvconn.c multibyte.c
                         pgtypes.c psqlodbc.c results.c setup.c
    src/pl/plpgsql/src: pl_comp.c pl_exec.c pl_funcs.c pl_handler.c

Log message:
    Remove dashes in comments that don't need them, rewrap with pgindent.


Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Tom Lane
Date:
Bruce Momjian - CVS <momjian@hub.org> writes:
>     Remove dashes in comments that don't need them, rewrap with pgindent.

Y'know, the one thing about pgindent that I really hate is its
assumption that it should override human judgment about block-comment
formatting.  Without exception, pgindentified text blocks are inferior
to the originals, and I don't think you should be helping it along
in this nefarious deed.  A random example of stupid line breaking
substituted for what had been an intelligently formatted comment:

***************
*** 247,257 ****
            break;
        }

!       /* ----------------
!        *       ok, the compare clause failed so we test if the keys
!        *       are equal... if key1 != key2, we return false.
!        *       otherwise key1 = key2 so we move on to the next pair of keys.
!        * ----------------
         */
        const_value = ExecEvalExpr((Node *) lfirst(eqclause),
                                   econtext,
--- 240,249 ----
            break;
        }

!       /*
!        * ok, the compare clause failed so we test if the keys are
!        * equal... if key1 != key2, we return false. otherwise key1 =
!        * key2 so we move on to the next pair of keys.
         */
        const_value = ExecEvalExpr((Node *) lfirst(eqclause),
                                   econtext,
***************
***


            regards, tom lane

Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
The Hermit Hacker
Date:
I think Alfred brought up a great point against pgindent also ... 'cvs
annotate' reports who touched not the file last, but down to the line ...
of course, everything that pgindent modifies is now "last modified by
momjian" ... not a major thing, but still *shrug*

On Thu, 22 Mar 2001, Tom Lane wrote:

> Bruce Momjian - CVS <momjian@hub.org> writes:
> >     Remove dashes in comments that don't need them, rewrap with pgindent.
>
> Y'know, the one thing about pgindent that I really hate is its
> assumption that it should override human judgment about block-comment
> formatting.  Without exception, pgindentified text blocks are inferior
> to the originals, and I don't think you should be helping it along
> in this nefarious deed.  A random example of stupid line breaking
> substituted for what had been an intelligently formatted comment:
>
> ***************
> *** 247,257 ****
>             break;
>         }
>
> !       /* ----------------
> !        *       ok, the compare clause failed so we test if the keys
> !        *       are equal... if key1 != key2, we return false.
> !        *       otherwise key1 = key2 so we move on to the next pair of keys.
> !        * ----------------
>          */
>         const_value = ExecEvalExpr((Node *) lfirst(eqclause),
>                                    econtext,
> --- 240,249 ----
>             break;
>         }
>
> !       /*
> !        * ok, the compare clause failed so we test if the keys are
> !        * equal... if key1 != key2, we return false. otherwise key1 =
> !        * key2 so we move on to the next pair of keys.
>          */
>         const_value = ExecEvalExpr((Node *) lfirst(eqclause),
>                                    econtext,
> ***************
> ***
>
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org


Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Bruce Momjian
Date:
I am a little confused on this one.  You like the earlier one because
you don't like the equals breaking on the line?


> !        * equal... if key1 != key2, we return false. otherwise key1 =
> !        * key2 so we move on to the next pair of keys.


> Bruce Momjian - CVS <momjian@hub.org> writes:
> >     Remove dashes in comments that don't need them, rewrap with pgindent.
>
> Y'know, the one thing about pgindent that I really hate is its
> assumption that it should override human judgment about block-comment
> formatting.  Without exception, pgindentified text blocks are inferior
> to the originals, and I don't think you should be helping it along
> in this nefarious deed.  A random example of stupid line breaking
> substituted for what had been an intelligently formatted comment:
>
> ***************
> *** 247,257 ****
>             break;
>         }
>
> !       /* ----------------
> !        *       ok, the compare clause failed so we test if the keys
> !        *       are equal... if key1 != key2, we return false.
> !        *       otherwise key1 = key2 so we move on to the next pair of keys.
> !        * ----------------
>          */
>         const_value = ExecEvalExpr((Node *) lfirst(eqclause),
>                                    econtext,
> --- 240,249 ----
>             break;
>         }
>
> !       /*
> !        * ok, the compare clause failed so we test if the keys are
> !        * equal... if key1 != key2, we return false. otherwise key1 =
> !        * key2 so we move on to the next pair of keys.
>          */
>         const_value = ExecEvalExpr((Node *) lfirst(eqclause),
>                                    econtext,
> ***************
> ***
>
>
>             regards, tom lane
>


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I am a little confused on this one.  You like the earlier one because
> you don't like the equals breaking on the line?

Exactly.

            regards, tom lane

Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Bruce Momjian
Date:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I am a little confused on this one.  You like the earlier one because
> > you don't like the equals breaking on the line?
>
> Exactly.

How about if it was key1=key2.  Is it OK for you without spaces?  That
would not wrap, and I can put it on my cleanup list for next time.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
The Hermit Hacker
Date:
On Thu, 22 Mar 2001, Bruce Momjian wrote:

> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > I am a little confused on this one.  You like the earlier one because
> > > you don't like the equals breaking on the line?
> >
> > Exactly.
>
> How about if it was key1=key2.  Is it OK for you without spaces?  That
> would not wrap, and I can put it on my cleanup list for next time.

so, if it had been 'key1 != key2', then we'd make it less legible by
making it 'key1!=key2'?

eek ...



Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Bruce Momjian
Date:
> On Thu, 22 Mar 2001, Bruce Momjian wrote:
>
> > > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > > I am a little confused on this one.  You like the earlier one because
> > > > you don't like the equals breaking on the line?
> > >
> > > Exactly.
> >
> > How about if it was key1=key2.  Is it OK for you without spaces?  That
> > would not wrap, and I can put it on my cleanup list for next time.
>
> so, if it had been 'key1 != key2', then we'd make it less legible by
> making it 'key1!=key2'?

Yea, kind of bad, huh?  That is the only way to prevent the comment
wrapping, unless we add /* ---  to those comments.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Yea, kind of bad, huh?  That is the only way to prevent the comment
> wrapping, unless we add /* ---  to those comments.

What I'm complaining about is that that comment HAD the dashes, and
you gratuitously removed them.  You promised me some time ago that
pgindent wouldn't mess up dash-protected comments.  You're violating
the terms of that armistice ...

            regards, tom lane

Re: pgsql/ ontrib/pg_dumplo/lo_export.c ontrib/pg_ ...

From
Bruce Momjian
Date:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Yea, kind of bad, huh?  That is the only way to prevent the comment
> > wrapping, unless we add /* ---  to those comments.
>
> What I'm complaining about is that that comment HAD the dashes, and
> you gratuitously removed them.  You promised me some time ago that
> pgindent wouldn't mess up dash-protected comments.  You're violating
> the terms of that armistice ...

Yes, I did.

I assumed /* ---- comments were used to protect pre-indented comment
text, an item Thomas has mentioned, and something I did properly
preserve.  I did not know it was being used for x = y wrap protection.

I just did:

    $ rgrepc '        [/ ]\* .*=$'

and

    $ rgrepc '        [/ ]\* ='

and see the comment you mentioned.  Let me go through and look at all
the equals wraps and re-add the dashes for you.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026