mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
@@ -65,7 +65,7 @@ char *Dynamic_library_path;
|
||||
|
||||
static void *internal_load_library(const char *libname);
|
||||
static void incompatible_module_error(const char *libname,
|
||||
const Pg_magic_struct *module_magic_data) pg_attribute_noreturn();
|
||||
const Pg_magic_struct *module_magic_data) pg_attribute_noreturn();
|
||||
static void internal_unload_library(const char *libname);
|
||||
static bool file_exists(const char *name);
|
||||
static char *expand_dynamic_library_name(const char *name);
|
||||
@@ -268,9 +268,9 @@ internal_load_library(const char *libname)
|
||||
free((char *) file_scanner);
|
||||
/* complain */
|
||||
ereport(ERROR,
|
||||
(errmsg("incompatible library \"%s\": missing magic block",
|
||||
libname),
|
||||
errhint("Extension libraries are required to use the PG_MODULE_MAGIC macro.")));
|
||||
(errmsg("incompatible library \"%s\": missing magic block",
|
||||
libname),
|
||||
errhint("Extension libraries are required to use the PG_MODULE_MAGIC macro.")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -362,7 +362,7 @@ incompatible_module_error(const char *libname,
|
||||
if (details.len)
|
||||
appendStringInfoChar(&details, '\n');
|
||||
appendStringInfo(&details,
|
||||
_("Server has FLOAT4PASSBYVAL = %s, library has %s."),
|
||||
_("Server has FLOAT4PASSBYVAL = %s, library has %s."),
|
||||
magic_data.float4byval ? "true" : "false",
|
||||
module_magic_data->float4byval ? "true" : "false");
|
||||
}
|
||||
@@ -371,14 +371,14 @@ incompatible_module_error(const char *libname,
|
||||
if (details.len)
|
||||
appendStringInfoChar(&details, '\n');
|
||||
appendStringInfo(&details,
|
||||
_("Server has FLOAT8PASSBYVAL = %s, library has %s."),
|
||||
_("Server has FLOAT8PASSBYVAL = %s, library has %s."),
|
||||
magic_data.float8byval ? "true" : "false",
|
||||
module_magic_data->float8byval ? "true" : "false");
|
||||
}
|
||||
|
||||
if (details.len == 0)
|
||||
appendStringInfoString(&details,
|
||||
_("Magic block has unexpected length or padding difference."));
|
||||
_("Magic block has unexpected length or padding difference."));
|
||||
|
||||
ereport(ERROR,
|
||||
(errmsg("incompatible library \"%s\": magic block mismatch",
|
||||
|
||||
Reference in New Issue
Block a user