summaryrefslogtreecommitdiff
path: root/src/include/snowball
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-03-08 17:01:13 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-03-08 17:01:13 -0500
commitd6b059ec740a6affce9a069f1210d161068317e3 (patch)
tree12b31459dcf728e09bcef55e1e7fac40f2d15fbd /src/include/snowball
parent2f899e7d37ece937740c99164dd846c4b6f884eb (diff)
downloadpostgresql-d6b059ec740a6affce9a069f1210d161068317e3.tar.gz
Document intentional violations of header inclusion policy.
Although there are good reasons for our policy of including postgres.h as the first #include in every .c file, never from .h files, there are two places where it seems expedient to violate the policy because the alternative is to modify externally-supplied .c files. (In the case of the regexp library, the idea that it's externally-supplied is kind of at odds with reality, but I haven't entirely given up hope that it will become a standalone project some day.) Add some comments to make it explicit that this is a policy violation and provide the reasoning. In passing, move #include "miscadmin.h" out of regcomp.c and into regcustom.h, which is where it should be if we're taking this reasoning seriously at all. Discussion: https://postgr.es/m/CAEepm=2zCoeq3QxVwhS5DFeUh=yU6z81pbWMgfOB8OzyiBwxzw@mail.gmail.com Discussion: https://postgr.es/m/11634.1488932128@sss.pgh.pa.us
Diffstat (limited to 'src/include/snowball')
-rw-r--r--src/include/snowball/header.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/snowball/header.h b/src/include/snowball/header.h
index 9501f77ac1..d8be02ee60 100644
--- a/src/include/snowball/header.h
+++ b/src/include/snowball/header.h
@@ -22,6 +22,11 @@
#ifndef SNOWBALL_HEADR_H
#define SNOWBALL_HEADR_H
+/*
+ * It's against Postgres coding conventions to include postgres.h in a
+ * header file, but we allow the violation here because the alternative is
+ * to modify the machine-generated .c files provided by the Snowball project.
+ */
#include "postgres.h"
/* Some platforms define MAXINT and/or MININT, causing conflicts */