From 5a288903b9aa9d93b8de3e76fb473098a4412b30 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 30 Aug 2003 14:59:34 +0000 Subject: [PATCH] Guard against pgindent changing =- to = -. --- src/backend/commands/tablecmds.c | 10 +++++----- src/tools/pgindent/pgindent | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 7788580233..ff9db4b779 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -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); diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index 44756fa503..f7c7b1e125 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -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 -- 2.40.0