]> granicus.if.org Git - postgresql/commitdiff
Guard against pgindent changing =- to = -.
authorBruce Momjian <bruce@momjian.us>
Sat, 30 Aug 2003 14:59:34 +0000 (14:59 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 30 Aug 2003 14:59:34 +0000 (14:59 +0000)
src/backend/commands/tablecmds.c
src/tools/pgindent/pgindent

index 77885802335d516ad9fdf511acef09732d63d0e9..ff9db4b7793c1d2534faffac5a4870e52c1d1633 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.79 2003/08/08 21:41:32 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.80 2003/08/30 14:59:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -2008,7 +2008,7 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse,
                }
        }
 
-       /* -= now do the thing on this relation =- */
+       /* now do the thing on this relation */
 
        /*
         * get the number of the attribute
@@ -2152,7 +2152,7 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse,
                }
        }
 
-       /* -= now do the thing on this relation =- */
+       /* now do the thing on this relation */
 
        /*
         * get the number of the attribute
@@ -2280,7 +2280,7 @@ AlterTableAlterColumnDefault(Oid myrelid, bool recurse,
                }
        }
 
-       /* -= now do the thing on this relation =- */
+       /* now do the thing on this relation */
 
        /*
         * get the number of the attribute
@@ -2445,7 +2445,7 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse,
                }
        }
 
-       /* -= now do the thing on this relation =- */
+       /* now do the thing on this relation */
 
        attrelation = heap_openr(AttributeRelationName, RowExclusiveLock);
 
index 44756fa50362d3d1473451d04f7fdcf8842c731f..f7c7b1e1251dacb2caace40555bab5cb136d46e7 100755 (executable)
@@ -33,6 +33,8 @@ do
        cat "$FILE" |
 # convert // comments to /* */
        sed 's;^\([     ]*\)//\(.*\)$;\1/* \2 */;g' |
+# Avoid bug that converts 'x =- 1' to 'x = -1'
+       sed 's;=- ;-= ;g' |
 # mark some comments for special treatment later
        sed 's;/\*  *---;/*---X_X;g' |
 # workaround for indent bug with 'else' handling
@@ -40,7 +42,7 @@ do
 \2;g' | 
        detab -t4 -qc |
 # work around bug where function that defines no local variables misindents
-# switch() case lines and line after #else.  Do not do with for struct/enum.
+# switch() case lines and line after #else.  Do not do for struct/enum.
        awk '   BEGIN   {line1 = ""; line2 = ""}
                {
                        line2 = $0;
@@ -1672,6 +1674,7 @@ do
                cat /tmp/$$
        fi
        cat /tmp/$$a |
+# restore DATA/CATALOG lines
        sed 's;^/\*\(DATA(.*\)\*/$;\1;' |
        sed 's;^/\*\(CATALOG(.*\)\*/$;\1;' |
 # remove tabs and retab with four spaces