summaryrefslogtreecommitdiff
path: root/src/include/parser/parse_relation.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-03-26 14:03:19 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-03-26 14:03:25 -0400
commit785941cdc359c6e595201ffb0df9d28f3f7173a4 (patch)
treef1cb5a309c53bf1b9112bc51e99c94bfa55f77c7 /src/include/parser/parse_relation.h
parentd04c8ed9044eccebce043143a930617e3998c005 (diff)
downloadpostgresql-785941cdc359c6e595201ffb0df9d28f3f7173a4.tar.gz
Tweak __attribute__-wrapping macros for better pgindent results.
This improves on commit bbfd7edae5aa5ad5553d3c7e102f2e450d4380d4 by making two simple changes: * pg_attribute_noreturn now takes parentheses, ie pg_attribute_noreturn(). Likewise pg_attribute_unused(), pg_attribute_packed(). This reduces pgindent's tendency to misformat declarations involving them. * attributes are now always attached to function declarations, not definitions. Previously some places were taking creative shortcuts, which were not merely candidates for bad misformatting by pgindent but often were outright wrong anyway. (It does little good to put a noreturn annotation where callers can't see it.) In any case, if we would like to believe that these macros can be used with non-gcc compilers, we should avoid gratuitous variance in usage patterns. I also went through and manually improved the formatting of a lot of declarations, and got rid of excessively repetitive (and now obsolete anyway) comments informing the reader what pg_attribute_printf is for.
Diffstat (limited to 'src/include/parser/parse_relation.h')
-rw-r--r--src/include/parser/parse_relation.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h
index 9dc0d5846b..ce563dea25 100644
--- a/src/include/parser/parse_relation.h
+++ b/src/include/parser/parse_relation.h
@@ -104,9 +104,9 @@ extern bool isLockedRefname(ParseState *pstate, const char *refname);
extern void addRTEtoQuery(ParseState *pstate, RangeTblEntry *rte,
bool addToJoinList,
bool addToRelNameSpace, bool addToVarNameSpace);
-extern void errorMissingRTE(ParseState *pstate, RangeVar *relation) pg_attribute_noreturn;
+extern void errorMissingRTE(ParseState *pstate, RangeVar *relation) pg_attribute_noreturn();
extern void errorMissingColumn(ParseState *pstate,
- char *relname, char *colname, int location) pg_attribute_noreturn;
+ char *relname, char *colname, int location) pg_attribute_noreturn();
extern void expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
int location, bool include_dropped,
List **colnames, List **colvars);