git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c44802)
Remove bogus "extern" annotations on function definitions.
2018年2月19日 17:07:44 +0000 (12:07 -0500)
2018年2月19日 17:07:44 +0000 (12:07 -0500)
While this is not illegal C, project style is to put "extern" only on
declarations not definitions.

David Rowley

Discussion: https://postgr.es/m/CAKJS1f9RKLWXcMBQhvDYhmsMEo+ALuNgA-NE+AX5Uoke9DJ2Xg@mail.gmail.com


diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 02894a7e354adc811c7a6f2ac8db90adbb1fd55e..8cd5843885e43739f235321b0456b5097b294839 100644 (file)
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -927,7 +927,7 @@ build_tlist_to_deparse(RelOptInfo *foreignrel)
*
* List of columns selected is returned in retrieved_attrs.
*/
-extern void
+void
deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *rel,
List *tlist, List *remote_conds, List *pathkeys,
bool is_subquery, List **retrieved_attrs,
@@ -1313,7 +1313,7 @@ appendConditions(List *exprs, deparse_expr_cxt *context)
}
/* Output join name for given join type */
-extern const char *
+const char *
get_jointype_name(JoinType jointype)
{
switch (jointype)
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index d37180ae10b9681713f745b31ca68f715e2ed8f8..941a2e75a533438c613ee6e7a63e90b46aa32561 100644 (file)
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -5567,7 +5567,7 @@ conversion_error_callback(void *arg)
* Find an equivalence class member expression, all of whose Vars, come from
* the indicated relation.
*/
-extern Expr *
+Expr *
find_em_expr_for_rel(EquivalenceClass *ec, RelOptInfo *rel)
{
ListCell *lc_em;
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index f2cb6d7fb81782c591a5b1775d926527131b5151..5fa87f5757f4d968e64b9e7c415babd5203859f8 100644 (file)
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -4023,7 +4023,7 @@ ResetReindexPending(void)
* EstimateReindexStateSpace
* Estimate space needed to pass reindex state to parallel workers.
*/
-extern Size
+Size
EstimateReindexStateSpace(void)
{
return offsetof(SerializedReindexState, pendingReindexedIndexes)
@@ -4034,7 +4034,7 @@ EstimateReindexStateSpace(void)
* SerializeReindexState
* Serialize reindex state for parallel workers.
*/
-extern void
+void
SerializeReindexState(Size maxsize, char *start_address)
{
SerializedReindexState *sistate = (SerializedReindexState *) start_address;
@@ -4052,7 +4052,7 @@ SerializeReindexState(Size maxsize, char *start_address)
* RestoreReindexState
* Restore reindex state in a parallel worker.
*/
-extern void
+void
RestoreReindexState(void *reindexstate)
{
SerializedReindexState *sistate = (SerializedReindexState *) reindexstate;
diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c
index 4dddfcc0142a9f5ca5e4eb47683685ac27000e2c..b1c7cd6c72380a6338bbfe14b320339877572ba9 100644 (file)
--- a/src/backend/catalog/partition.c
+++ b/src/backend/catalog/partition.c
@@ -856,7 +856,7 @@ partition_bounds_equal(int partnatts, int16 *parttyplen, bool *parttypbyval,
* Return a copy of given PartitionBoundInfo structure. The data types of bounds
* are described by given partition key specification.
*/
-extern PartitionBoundInfo
+PartitionBoundInfo
partition_bounds_copy(PartitionBoundInfo src,
PartitionKey key)
{
diff --git a/src/backend/foreign/foreign.c b/src/backend/foreign/foreign.c
index e7fd507fa5fbb7bf19ad0d6d32a244b0301ba88d..eac78a5d315590ca74c60ef4cf3c1ba9cfc3511e 100644 (file)
--- a/src/backend/foreign/foreign.c
+++ b/src/backend/foreign/foreign.c
@@ -712,7 +712,7 @@ get_foreign_server_oid(const char *servername, bool missing_ok)
* path list in RelOptInfo is anyway sorted by total cost we are likely to
* choose the most efficient path, which is all for the best.
*/
-extern Path *
+Path *
GetExistingLocalJoinPath(RelOptInfo *joinrel)
{
ListCell *lc;
diff --git a/src/backend/storage/ipc/shm_toc.c b/src/backend/storage/ipc/shm_toc.c
index 2abd140a963b9de0f549c09a0efe79c2ef298f29..ee5ec6e38014694dd4b1c2ba552c456428396323 100644 (file)
--- a/src/backend/storage/ipc/shm_toc.c
+++ b/src/backend/storage/ipc/shm_toc.c
@@ -60,7 +60,7 @@ shm_toc_create(uint64 magic, void *address, Size nbytes)
* Attach to an existing table of contents. If the magic number found at
* the target address doesn't match our expectations, return NULL.
*/
-extern shm_toc *
+shm_toc *
shm_toc_attach(uint64 magic, void *address)
{
shm_toc *toc = (shm_toc *) address;
@@ -84,7 +84,7 @@ shm_toc_attach(uint64 magic, void *address)
* We allocate backwards from the end of the segment, so that the TOC entries
* can grow forward from the start of the segment.
*/
-extern void *
+void *
shm_toc_allocate(shm_toc *toc, Size nbytes)
{
volatile shm_toc *vtoc = toc;
@@ -127,7 +127,7 @@ shm_toc_allocate(shm_toc *toc, Size nbytes)
/*
* Return the number of bytes that can still be allocated.
*/
-extern Size
+Size
shm_toc_freespace(shm_toc *toc)
{
volatile shm_toc *vtoc = toc;
diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c
index 3ba9bb351916bf4867c2cab3e6cb9c4d9c006143..6f0fe94d63f26bba74b6853db9e58f8801c644df 100644 (file)
--- a/src/backend/utils/adt/json.c
+++ b/src/backend/utils/adt/json.c
@@ -1843,7 +1843,7 @@ add_json(Datum val, bool is_null, StringInfo result,
/*
* SQL function array_to_json(row)
*/
-extern Datum
+Datum
array_to_json(PG_FUNCTION_ARGS)
{
Datum array = PG_GETARG_DATUM(0);
@@ -1859,7 +1859,7 @@ array_to_json(PG_FUNCTION_ARGS)
/*
* SQL function array_to_json(row, prettybool)
*/
-extern Datum
+Datum
array_to_json_pretty(PG_FUNCTION_ARGS)
{
Datum array = PG_GETARG_DATUM(0);
@@ -1876,7 +1876,7 @@ array_to_json_pretty(PG_FUNCTION_ARGS)
/*
* SQL function row_to_json(row)
*/
-extern Datum
+Datum
row_to_json(PG_FUNCTION_ARGS)
{
Datum array = PG_GETARG_DATUM(0);
@@ -1892,7 +1892,7 @@ row_to_json(PG_FUNCTION_ARGS)
/*
* SQL function row_to_json(row, prettybool)
*/
-extern Datum
+Datum
row_to_json_pretty(PG_FUNCTION_ARGS)
{
Datum array = PG_GETARG_DATUM(0);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /