Thread: patch for spelling mistake

patch for spelling mistake

From
nconway@klamath.dyndns.org (Neil Conway)
Date:
Hi everyone,

This trivial patch fixes a spelling mistake
('indicies' -> 'indexes') in the file src/backend/commands/cluster.c

I'll probably submit a MUCH larger patch which changes
'indices' -> 'indexes' -- but for now I'm just changing
'indicies', which is unquestionably incorrect.

I think I made the patch properly; from the root of the 'pgsql'
CVS module, apply with: patch -p0 < patchfile.

Cheers,

Neil

Index: src/backend/commands/cluster.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/cluster.c,v
retrieving revision 1.66
diff -r1.66 cluster.c
48c48
<  *     Create a list of all the other indicies on this relation. Because
---
>  *     Create a list of all the other indexes on this relation. Because
50c50
<  *     indicies. The user will have to re-create them. Not nice, but
---
>  *     indexes. The user will have to re-create them. Not nice, but
54c54
<  *     hand, re-creating n indicies may blow out the space.
---
>  *     hand, re-creating n indexes may blow out the space.

Re: patch for spelling mistake

From
Tom Lane
Date:
nconway@klamath.dyndns.org (Neil Conway) writes:
> I think I made the patch properly; from the root of the 'pgsql'
> CVS module, apply with: patch -p0 < patchfile.

diff -c output is preferred.  A plain diff such as you have here has too
little context to be safe to apply (if someone else has edited the file
since the version you diffed from, a plain diff patch is much too likely
to be applied incorrectly).

            regards, tom lane

Re: patch for spelling mistake

From
Bruce Momjian
Date:
> nconway@klamath.dyndns.org (Neil Conway) writes:
> > I think I made the patch properly; from the root of the 'pgsql'
> > CVS module, apply with: patch -p0 < patchfile.
>
> diff -c output is preferred.  A plain diff such as you have here has too
> little context to be safe to apply (if someone else has edited the file
> since the version you diffed from, a plain diff patch is much too likely
> to be applied incorrectly).

Tom is right, diff -c is best, though in the patch you applied, there is
no chance for error so I can accept it.  You have unique previous text
for each change.

--
  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: patch for spelling mistake

From
Neil Conway
Date:
On Tue, Jul 10, 2001 at 08:58:30PM -0400, Bruce Momjian wrote:
> > nconway@klamath.dyndns.org (Neil Conway) writes:
> > > I think I made the patch properly; from the root of the 'pgsql'
> > > CVS module, apply with: patch -p0 < patchfile.
> >
> > diff -c output is preferred.  A plain diff such as you have here has too
> > little context to be safe to apply (if someone else has edited the file
> > since the version you diffed from, a plain diff patch is much too likely
> > to be applied incorrectly).
>
> Tom is right, diff -c is best, though in the patch you applied, there is
> no chance for error so I can accept it.  You have unique previous text
> for each change.

Sorry about that -- and thanks for the tip (Tom & Bruce).

I've remade the patch using the make_diff tools -- that seems to
produce the preferred the format. The updated patch is below.

I'm going to add this info to the Developer's FAQ, but it seems like
there are 2 copies -- one plaintext and one HTML: it seems as though
they are updated simultaneously (according to the CVS logs anyway).
Which version should I make changes to? Both? Are they generated from
a single source document somewhere?

Cheers,

Neil

*** ./src/backend/commands/cluster.c.orig    Tue Jul 10 21:34:14 2001
--- ./src/backend/commands/cluster.c    Tue Jul 10 21:34:30 2001
***************
*** 45,57 ****
   * cluster
   *
   * STILL TO DO:
!  *     Create a list of all the other indicies on this relation. Because
   *     the cluster will wreck all the tids, I'll need to destroy bogus
!  *     indicies. The user will have to re-create them. Not nice, but
   *     I'm not a nice guy. The alternative is to try some kind of post
   *     destroy re-build. This may be possible. I'll check out what the
   *     index create functiond want in the way of paramaters. On the other
!  *     hand, re-creating n indicies may blow out the space.
   */
  void
  cluster(char *oldrelname, char *oldindexname)
--- 45,57 ----
   * cluster
   *
   * STILL TO DO:
!  *     Create a list of all the other indexes on this relation. Because
   *     the cluster will wreck all the tids, I'll need to destroy bogus
!  *     indexes. The user will have to re-create them. Not nice, but
   *     I'm not a nice guy. The alternative is to try some kind of post
   *     destroy re-build. This may be possible. I'll check out what the
   *     index create functiond want in the way of paramaters. On the other
!  *     hand, re-creating n indexes may blow out the space.
   */
  void
  cluster(char *oldrelname, char *oldindexname)

RE: patch for spelling mistake

From
"Christopher Kings-Lynne"
Date:
> I've remade the patch using the make_diff tools -- that seems to
> produce the preferred the format. The updated patch is below.

Hmm...all I do is:

cvs diff -c file.c > file.diff

Chris


Re: patch for spelling mistake

From
Bruce Momjian
Date:
> >
> > Tom is right, diff -c is best, though in the patch you applied, there is
> > no chance for error so I can accept it.  You have unique previous text
> > for each change.
>
> Sorry about that -- and thanks for the tip (Tom & Bruce).
>
> I've remade the patch using the make_diff tools -- that seems to
> produce the preferred the format. The updated patch is below.
>
> I'm going to add this info to the Developer's FAQ, but it seems like
> there are 2 copies -- one plaintext and one HTML: it seems as though
> they are updated simultaneously (according to the CVS logs anyway).
> Which version should I make changes to? Both? Are they generated from
> a single source document somewhere?

I have updated the developers FAQ to mentiton diff -c when I mention
make_diff.  The proces of updateing this file involves using lyx to
convert the html to text, cvs commiting both, and then logging into he
main server, cvs update, then copy the faq's to the web directory.  I
can be more specific if people are interested.

--
  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: patch for spelling mistake

From
Bruce Momjian
Date:
Thanks.  Patch applied.


> On Tue, Jul 10, 2001 at 08:58:30PM -0400, Bruce Momjian wrote:
> > > nconway@klamath.dyndns.org (Neil Conway) writes:
> > > > I think I made the patch properly; from the root of the 'pgsql'
> > > > CVS module, apply with: patch -p0 < patchfile.
> > >
> > > diff -c output is preferred.  A plain diff such as you have here has too
> > > little context to be safe to apply (if someone else has edited the file
> > > since the version you diffed from, a plain diff patch is much too likely
> > > to be applied incorrectly).
> >
> > Tom is right, diff -c is best, though in the patch you applied, there is
> > no chance for error so I can accept it.  You have unique previous text
> > for each change.
>
> Sorry about that -- and thanks for the tip (Tom & Bruce).
>
> I've remade the patch using the make_diff tools -- that seems to
> produce the preferred the format. The updated patch is below.
>
> I'm going to add this info to the Developer's FAQ, but it seems like
> there are 2 copies -- one plaintext and one HTML: it seems as though
> they are updated simultaneously (according to the CVS logs anyway).
> Which version should I make changes to? Both? Are they generated from
> a single source document somewhere?
>
> Cheers,
>
> Neil
>
> *** ./src/backend/commands/cluster.c.orig    Tue Jul 10 21:34:14 2001
> --- ./src/backend/commands/cluster.c    Tue Jul 10 21:34:30 2001
> ***************
> *** 45,57 ****
>    * cluster
>    *
>    * STILL TO DO:
> !  *     Create a list of all the other indicies on this relation. Because
>    *     the cluster will wreck all the tids, I'll need to destroy bogus
> !  *     indicies. The user will have to re-create them. Not nice, but
>    *     I'm not a nice guy. The alternative is to try some kind of post
>    *     destroy re-build. This may be possible. I'll check out what the
>    *     index create functiond want in the way of paramaters. On the other
> !  *     hand, re-creating n indicies may blow out the space.
>    */
>   void
>   cluster(char *oldrelname, char *oldindexname)
> --- 45,57 ----
>    * cluster
>    *
>    * STILL TO DO:
> !  *     Create a list of all the other indexes on this relation. Because
>    *     the cluster will wreck all the tids, I'll need to destroy bogus
> !  *     indexes. The user will have to re-create them. Not nice, but
>    *     I'm not a nice guy. The alternative is to try some kind of post
>    *     destroy re-build. This may be possible. I'll check out what the
>    *     index create functiond want in the way of paramaters. On the other
> !  *     hand, re-creating n indexes may blow out the space.
>    */
>   void
>   cluster(char *oldrelname, char *oldindexname)
>

--
  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