int i_datallowconn;
FILE *script = NULL;
char output_path[MAXPGPATH];
- bool found = false;
prep_status("Checking database connection settings");
*/
if (strcmp(datallowconn, "f") == 0)
{
- found = true;
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
pg_fatal("could not open file \"%s\": %s",
output_path, strerror(errno));
PQfinish(conn_template1);
if (script)
- fclose(script);
-
- if (found)
{
+ fclose(script);
pg_log(PG_REPORT, "fatal");
pg_fatal("All non-template0 databases must allow connections, i.e. their\n"
"pg_database.datallowconn must be true. Your installation contains\n"
{
int dbnum;
FILE *script = NULL;
- bool found = false;
char output_path[MAXPGPATH];
prep_status("Checking for contrib/isn with bigint-passing mismatch");
i_proname = PQfnumber(res, "proname");
for (rowno = 0; rowno < ntups; rowno++)
{
- found = true;
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
pg_fatal("could not open file \"%s\": %s",
output_path, strerror(errno));
}
if (script)
- fclose(script);
-
- if (found)
{
+ fclose(script);
pg_log(PG_REPORT, "fatal");
pg_fatal("Your installation contains \"contrib/isn\" functions which rely on the\n"
"bigint data type. Your old and new clusters pass bigint values\n"
{
int dbnum;
FILE *script = NULL;
- bool found = false;
char output_path[MAXPGPATH];
prep_status("Checking for user-defined postfix operators");
i_typname = PQfnumber(res, "typname");
for (rowno = 0; rowno < ntups; rowno++)
{
- found = true;
if (script == NULL &&
(script = fopen_priv(output_path, "w")) == NULL)
pg_fatal("could not open file \"%s\": %s",
}
if (script)
- fclose(script);
-
- if (found)
{
+ fclose(script);
pg_log(PG_REPORT, "fatal");
pg_fatal("Your installation contains user-defined postfix operators, which are not\n"
"supported anymore. Consider dropping the postfix operators and replacing\n"
{
int dbnum;
FILE *script = NULL;
- bool found = false;
char output_path[MAXPGPATH];
prep_status("Checking for tables WITH OIDS");
i_relname = PQfnumber(res, "relname");
for (rowno = 0; rowno < ntups; rowno++)
{
- found = true;
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
pg_fatal("could not open file \"%s\": %s",
output_path, strerror(errno));
}
if (script)
- fclose(script);
-
- if (found)
{
+ fclose(script);
pg_log(PG_REPORT, "fatal");
pg_fatal("Your installation contains tables declared WITH OIDS, which is not\n"
"supported anymore. Consider removing the oid column using\n"
{
int dbnum;
FILE *script = NULL;
- bool found = false;
char output_path[MAXPGPATH];
prep_status("Checking for user-defined encoding conversions");
i_nspname = PQfnumber(res, "nspname");
for (rowno = 0; rowno < ntups; rowno++)
{
- found = true;
if (script == NULL &&
(script = fopen_priv(output_path, "w")) == NULL)
pg_fatal("could not open file \"%s\": %s",
}
if (script)
- fclose(script);
-
- if (found)
{
+ fclose(script);
pg_log(PG_REPORT, "fatal");
pg_fatal("Your installation contains user-defined encoding conversions.\n"
"The conversion function parameters changed in PostgreSQL version 14\n"