Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5a28890

Browse files
committed
Guard against pgindent changing =- to = -.
1 parentceacae7 commit5a28890

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.79 2003/08/08 21:41:32 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.80 2003/08/30 14:59:34 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2008,7 +2008,7 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse,
20082008
}
20092009
}
20102010

2011-
/*-=now do the thing on this relation =- */
2011+
/* now do the thing on this relation */
20122012

20132013
/*
20142014
* get the number of the attribute
@@ -2152,7 +2152,7 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse,
21522152
}
21532153
}
21542154

2155-
/*-=now do the thing on this relation =- */
2155+
/* now do the thing on this relation */
21562156

21572157
/*
21582158
* get the number of the attribute
@@ -2280,7 +2280,7 @@ AlterTableAlterColumnDefault(Oid myrelid, bool recurse,
22802280
}
22812281
}
22822282

2283-
/*-=now do the thing on this relation =- */
2283+
/* now do the thing on this relation */
22842284

22852285
/*
22862286
* get the number of the attribute
@@ -2445,7 +2445,7 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse,
24452445
}
24462446
}
24472447

2448-
/*-=now do the thing on this relation =- */
2448+
/* now do the thing on this relation */
24492449

24502450
attrelation=heap_openr(AttributeRelationName,RowExclusiveLock);
24512451

‎src/tools/pgindent/pgindent

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ do
3333
cat"$FILE"|
3434
# convert // comments to /* */
3535
sed's;^\([ ]*\)//\(.*\)$;\1/* \2 */;g'|
36+
# Avoid bug that converts 'x =- 1' to 'x = -1'
37+
sed's;=- ;-= ;g'|
3638
# mark some comments for special treatment later
3739
sed's;/\* *---;/*---X_X;g'|
3840
# workaround for indent bug with 'else' handling
3941
sed's;\([} ]\)else[ ]*\(/\*.*\)$;\1else\
4042
\2;g'|
4143
detab -t4 -qc|
4244
# work around bug where function that defines no local variables misindents
43-
# switch() case lines and line after #else. Do not dowithfor struct/enum.
45+
# switch() case lines and line after #else. Do not do for struct/enum.
4446
awk'BEGIN{line1 = ""; line2 = ""}
4547
{
4648
line2 = $0;
@@ -1672,6 +1674,7 @@ do
16721674
cat /tmp/$$
16731675
fi
16741676
cat /tmp/$$a|
1677+
# restore DATA/CATALOG lines
16751678
sed's;^/\*\(DATA(.*\)\*/$;\1;'|
16761679
sed's;^/\*\(CATALOG(.*\)\*/$;\1;'|
16771680
# remove tabs and retab with four spaces

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp