aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/extension.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-05-14 13:06:38 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-05-14 13:06:50 -0400
commit5cbfce562f7cd2aab0cdc4694ce298ec3567930e (patch)
tree64e722d72fc5f1803cb6f6371d6cf12863e2812f /src/backend/commands/extension.c
parent1255466f8358ecac29581aa5ecec76628dc2e33c (diff)
downloadpostgresql-5cbfce562f7cd2aab0cdc4694ce298ec3567930e.tar.gz
postgresql-5cbfce562f7cd2aab0cdc4694ce298ec3567930e.zip
Initial pgindent and pgperltidy run for v13.
Includes some manual cleanup of places that pgindent messed up, most of which weren't per project style anyway. Notably, it seems some people didn't absorb the style rules of commit c9d297751, because there were a bunch of new occurrences of function calls with a newline just after the left paren, all with faulty expectations about how the rest of the call would get indented.
Diffstat (limited to 'src/backend/commands/extension.c')
-rw-r--r--src/backend/commands/extension.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index 38cbea385ae..9b669d95b80 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -1402,39 +1402,39 @@ CreateExtensionInternal(char *extensionName,
* does what is needed, we try to find a sequence of update scripts that
* will get us there.
*/
- filename = get_extension_script_filename(pcontrol, NULL, versionName);
- if (stat(filename, &fst) == 0)
- {
- /* Easy, no extra scripts */
- updateVersions = NIL;
- }
- else
- {
- /* Look for best way to install this version */
- List *evi_list;
- ExtensionVersionInfo *evi_start;
- ExtensionVersionInfo *evi_target;
+ filename = get_extension_script_filename(pcontrol, NULL, versionName);
+ if (stat(filename, &fst) == 0)
+ {
+ /* Easy, no extra scripts */
+ updateVersions = NIL;
+ }
+ else
+ {
+ /* Look for best way to install this version */
+ List *evi_list;
+ ExtensionVersionInfo *evi_start;
+ ExtensionVersionInfo *evi_target;
- /* Extract the version update graph from the script directory */
- evi_list = get_ext_ver_list(pcontrol);
+ /* Extract the version update graph from the script directory */
+ evi_list = get_ext_ver_list(pcontrol);
- /* Identify the target version */
- evi_target = get_ext_ver_info(versionName, &evi_list);
+ /* Identify the target version */
+ evi_target = get_ext_ver_info(versionName, &evi_list);
- /* Identify best path to reach target */
- evi_start = find_install_path(evi_list, evi_target,
- &updateVersions);
+ /* Identify best path to reach target */
+ evi_start = find_install_path(evi_list, evi_target,
+ &updateVersions);
- /* Fail if no path ... */
- if (evi_start == NULL)
- ereport(ERROR,
- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("extension \"%s\" has no installation script nor update path for version \"%s\"",
- pcontrol->name, versionName)));
+ /* Fail if no path ... */
+ if (evi_start == NULL)
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("extension \"%s\" has no installation script nor update path for version \"%s\"",
+ pcontrol->name, versionName)));
- /* Otherwise, install best starting point and then upgrade */
- versionName = evi_start->name;
- }
+ /* Otherwise, install best starting point and then upgrade */
+ versionName = evi_start->name;
+ }
/*
* Fetch control parameters for installation target version