bool ccvalid = constr->check[ccnum].ccvalid;
Node *ccbin_node;
bool found_whole_row;
- Constraint *constr;
+ Constraint *con;
/*
* The partitioned table can not have a NO INHERIT check constraint
ccname,
RelationGetRelationName(parent_rel));
- constr = makeNode(Constraint);
- constr->contype = CONSTR_CHECK;
- constr->conname = pstrdup(ccname);
- constr->deferrable = false;
- constr->initdeferred = false;
- constr->is_enforced = ccenforced;
- constr->skip_validation = !ccvalid;
- constr->initially_valid = ccvalid;
- constr->is_no_inherit = ccnoinherit;
- constr->raw_expr = NULL;
- constr->cooked_expr = nodeToString(ccbin_node);
- constr->location = -1;
- constraints = lappend(constraints, constr);
+ con = makeNode(Constraint);
+ con->contype = CONSTR_CHECK;
+ con->conname = pstrdup(ccname);
+ con->deferrable = false;
+ con->initdeferred = false;
+ con->is_enforced = ccenforced;
+ con->skip_validation = !ccvalid;
+ con->initially_valid = ccvalid;
+ con->is_no_inherit = ccnoinherit;
+ con->raw_expr = NULL;
+ con->cooked_expr = nodeToString(ccbin_node);
+ con->location = -1;
+ constraints = lappend(constraints, con);
}
/* Install all CHECK constraints. */
{
char *timeout_str;
const char *hintmsg;
- double result;
+ double dval;
if (timeout_specified)
errorConflictingDefElem(defel, pstate);
timeout_str = defGetString(defel);
- if (!parse_real(timeout_str, &result, GUC_UNIT_MS, &hintmsg))
+ if (!parse_real(timeout_str, &dval, GUC_UNIT_MS, &hintmsg))
{
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
* don't fail on just-out-of-range values that would round into
* range.
*/
- result = rint(result);
+ dval = rint(dval);
/* Range check */
- if (unlikely(isnan(result) || !FLOAT8_FITS_IN_INT64(result)))
+ if (unlikely(isnan(dval) || !FLOAT8_FITS_IN_INT64(dval)))
ereport(ERROR,
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("timeout value is out of range"));
- if (result < 0)
+ if (dval < 0)
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("timeout cannot be negative"));
- timeout = (int64) result;
+ timeout = (int64) dval;
}
else if (strcmp(defel->defname, "no_throw") == 0)
{
{
BackgroundWorker bgw;
BackgroundWorkerHandle *bgw_handle;
- bool launcher_running;
+ bool running;
DataChecksumsWorkerOperation launcher_running_op;
#ifdef USE_ASSERT_CHECKING
DataChecksumState->launch_cost_limit = cost_limit;
/* Is the launcher already running? If so, what is it doing? */
- launcher_running = DataChecksumState->launcher_running;
- if (launcher_running)
+ running = DataChecksumState->launcher_running;
+ if (running)
launcher_running_op = DataChecksumState->operation;
LWLockRelease(DataChecksumsWorkerLock);
* already in the desired state, i.e. if the checksums are already enabled
* and you call pg_enable_data_checksums().
*/
- if (!launcher_running)
+ if (!running)
{
/*
* Prepare the BackgroundWorker and launch it.
PQExpBuffer buffer);
static void executeCommand(PGconn *conn, const char *query);
static void check_for_invalid_global_names(PGconn *conn,
- SimpleStringList *database_exclude_names);
+ SimpleStringList *excluded_names);
static void expand_dbname_patterns(PGconn *conn, SimpleStringList *patterns,
SimpleStringList *names);
static void read_dumpall_filters(const char *filename, SimpleStringList *pattern);
*/
static void
check_for_invalid_global_names(PGconn *conn,
- SimpleStringList *database_exclude_names)
+ SimpleStringList *excluded_names)
{
PGresult *res;
int i;
/* Skip excluded databases since they won't be in map.dat */
if (strcmp(objtype, "database") == 0 &&
- simple_string_list_member(database_exclude_names, objname))
+ simple_string_list_member(excluded_names, objname))
continue;
if (strpbrk(objname, "\n\r"))
static ArchiveFormat
parseDumpFormat(const char *format)
{
- ArchiveFormat archDumpFormat;
-
if (pg_strcasecmp(format, "c") == 0)
- archDumpFormat = archCustom;
+ return archCustom;
else if (pg_strcasecmp(format, "custom") == 0)
- archDumpFormat = archCustom;
+ return archCustom;
else if (pg_strcasecmp(format, "d") == 0)
- archDumpFormat = archDirectory;
+ return archDirectory;
else if (pg_strcasecmp(format, "directory") == 0)
- archDumpFormat = archDirectory;
+ return archDirectory;
else if (pg_strcasecmp(format, "p") == 0)
- archDumpFormat = archNull;
+ return archNull;
else if (pg_strcasecmp(format, "plain") == 0)
- archDumpFormat = archNull;
+ return archNull;
else if (pg_strcasecmp(format, "t") == 0)
- archDumpFormat = archTar;
+ return archTar;
else if (pg_strcasecmp(format, "tar") == 0)
- archDumpFormat = archTar;
+ return archTar;
else
pg_fatal("unrecognized output format \"%s\"; please specify \"c\", \"d\", \"p\", or \"t\"",
format);
- return archDumpFormat;
+ return archUnknown;
}
/*
*/
if (tableinfo.relkind == RELKIND_PROPGRAPH)
{
- printQueryOpt myopt = pset.popt;
+ printQueryOpt popt = pset.popt;
char *footers[3] = {NULL, NULL, NULL};
printfPQExpBuffer(&buf, "/* %s */\n", _("Get property graph information"));
}
}
- myopt.footers = footers;
- myopt.topt.default_footer = false;
- myopt.title = title.data;
- myopt.translate_header = true;
+ popt.footers = footers;
+ popt.topt.default_footer = false;
+ popt.title = title.data;
+ popt.translate_header = true;
- printQuery(res, &myopt, pset.queryFout, false, pset.logfile);
+ printQuery(res, &popt, pset.queryFout, false, pset.logfile);
free(footers[0]);
free(footers[1]);