enum isn_type type = INVALID;
char buf[MAXEAN13LEN + 1];
- char *firstdig,
- *aux;
+ char *aux;
unsigned digval;
unsigned search;
ean13 ret = ean;
/* convert the number */
search = 0;
- firstdig = aux = buf + 13;
+ aux = buf + 13;
*aux = '\0'; /* terminate string; aux points to last digit */
do
{
const unsigned (*TABLE_index)[2];
enum isn_type type = INVALID;
- char *firstdig,
- *aux;
+ char *aux;
unsigned digval;
unsigned search;
char valid = '\0'; /* was the number initially written with a
/* convert the number */
search = 0;
- firstdig = aux = result + MAXEAN13LEN;
+ aux = result + MAXEAN13LEN;
*aux = '\0'; /* terminate string; aux points to last digit */
*--aux = valid; /* append '!' for numbers with invalid but
* corrected check digit */
fsm_page_contents(PG_FUNCTION_ARGS)
{
bytea *raw_page = PG_GETARG_BYTEA_P(0);
- int raw_page_size;
StringInfoData sinfo;
FSMPage fsmpage;
int i;
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("must be superuser to use raw page functions"))));
- raw_page_size = VARSIZE(raw_page) - VARHDRSZ;
fsmpage = (FSMPage) PageGetContents(VARDATA(raw_page));
initStringInfo(&sinfo);
calc_s2k_simple(PGP_S2K *s2k, PX_MD *md, const uint8 *key,
unsigned key_len)
{
- unsigned md_bs,
- md_rlen;
+ unsigned md_rlen;
uint8 buf[PGP_MAX_DIGEST];
unsigned preload;
unsigned remain;
uint8 *dst = s2k->key;
- md_bs = px_md_block_size(md);
md_rlen = px_md_result_size(md);
remain = s2k->key_len;
static int
calc_s2k_salted(PGP_S2K *s2k, PX_MD *md, const uint8 *key, unsigned key_len)
{
- unsigned md_bs,
- md_rlen;
+ unsigned md_rlen;
uint8 buf[PGP_MAX_DIGEST];
unsigned preload = 0;
uint8 *dst;
unsigned remain;
- md_bs = px_md_block_size(md);
md_rlen = px_md_result_size(md);
dst = s2k->key;
calc_s2k_iter_salted(PGP_S2K *s2k, PX_MD *md, const uint8 *key,
unsigned key_len)
{
- unsigned md_bs,
- md_rlen;
+ unsigned md_rlen;
uint8 buf[PGP_MAX_DIGEST];
uint8 *dst;
unsigned preload = 0;
cval = s2k->iter;
count = ((unsigned) 16 + (cval & 15)) << ((cval >> 4) + 6);
- md_bs = px_md_block_size(md);
md_rlen = px_md_result_size(md);
remain = s2k->key_len;
hmac_init(PX_HMAC *h, const uint8 *key, unsigned klen)
{
unsigned bs,
- hlen,
i;
uint8 *keybuf;
PX_MD *md = h->md;
bs = px_md_block_size(md);
- hlen = px_md_result_size(md);
keybuf = px_alloc(bs);
memset(keybuf, 0, bs);
const uint8 *iv, unsigned ivlen)
{
int err;
- unsigned bs,
- ks,
+ unsigned ks,
ivs;
PX_Cipher *c = cx->cipher;
uint8 *ivbuf = NULL;
uint8 *keybuf;
- bs = px_cipher_block_size(c);
ks = px_cipher_key_size(c);
ivs = px_cipher_iv_size(c);
int err = 0;
uint8 *bbuf;
unsigned bs,
- maxlen,
bpos,
i,
pad;
PX_Cipher *c = cx->cipher;
bbuf = NULL;
- maxlen = *rlen;
bs = px_cipher_block_size(c);
/* encrypt */
'0', '0', '0', '0', '\0'
};
char *p;
- char *mant;
int exp;
int i,
dp,
*p = '\0';
/* get the exponent */
- mant = (char *) strtok(strdup(result), "e");
+ strtok(strdup(result), "e");
exp = atoi(strtok(NULL, "e"));
if (exp == 0)
BlockNumber npages,
blkno;
BlockNumber totFreePages;
- BlockNumber lastBlock = GIST_ROOT_BLKNO,
- lastFilledBlock = GIST_ROOT_BLKNO;
bool needLock;
/* No-op in ANALYZE ONLY mode */
totFreePages++;
RecordFreeIndexPage(rel, blkno);
}
- else
- lastFilledBlock = blkno;
UnlockReleaseBuffer(buffer);
}
- lastBlock = npages - 1;
/* Finally, vacuum the FSM */
IndexFreeSpaceMapVacuum(info->index);
/* XLOG stuff */
{
- XLogRecPtr recptr;
XLogRecData rdata[1];
xl_btree_reuse_page xlrec_reuse;
rdata[0].buffer = InvalidBuffer;
rdata[0].next = NULL;
- recptr = XLogInsert(RM_BTREE_ID, XLOG_BTREE_REUSE_PAGE, rdata);
+ XLogInsert(RM_BTREE_ID, XLOG_BTREE_REUSE_PAGE, rdata);
/*
* We don't do PageSetLSN or PageSetTLI here because we're about
{
Oid funcoid = PG_GETARG_OID(0);
HeapTuple tuple;
- Form_pg_proc proc;
bool isnull;
Datum tmp;
char *prosrc;
tuple = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcoid));
if (!HeapTupleIsValid(tuple))
elog(ERROR, "cache lookup failed for function %u", funcoid);
- proc = (Form_pg_proc) GETSTRUCT(tuple);
tmp = SysCacheGetAttr(PROCOID, tuple, Anum_pg_proc_prosrc, &isnull);
if (isnull)
Oid funcoid = PG_GETARG_OID(0);
void *libraryhandle;
HeapTuple tuple;
- Form_pg_proc proc;
bool isnull;
Datum tmp;
char *prosrc;
tuple = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcoid));
if (!HeapTupleIsValid(tuple))
elog(ERROR, "cache lookup failed for function %u", funcoid);
- proc = (Form_pg_proc) GETSTRUCT(tuple);
tmp = SysCacheGetAttr(PROCOID, tuple, Anum_pg_proc_prosrc, &isnull);
if (isnull)
Relation toast_rel;
Relation class_rel;
Oid toast_relid;
- Oid toast_idxid;
Oid toast_typid = InvalidOid;
Oid namespaceid;
char toast_relname[NAMEDATALEN];
coloptions[0] = 0;
coloptions[1] = 0;
- toast_idxid = index_create(toast_rel, toast_idxname, toastIndexOid,
+ index_create(toast_rel, toast_idxname, toastIndexOid,
indexInfo,
list_make2("chunk_id", "chunk_seq"),
BTREE_AM_OID,
List *result = NIL;
bool useprefix;
ListCell *lc;
- int i;
/* No work if empty tlist (this occurs eg in bitmap indexscans) */
if (plan->targetlist == NIL)
useprefix = list_length(es->rtable) > 1;
/* Deparse each result column (we now include resjunk ones) */
- i = 0;
foreach(lc, plan->targetlist)
{
TargetEntry *tle = (TargetEntry *) lfirst(lc);
AttrNumber parent_attno;
int parent_natts;
TupleDesc tupleDesc;
- TupleConstr *constr;
HeapTuple tuple;
attrrel = heap_open(AttributeRelationId, RowExclusiveLock);
tupleDesc = RelationGetDescr(parent_rel);
parent_natts = tupleDesc->natts;
- constr = tupleDesc->constr;
for (parent_attno = 1; parent_attno <= parent_natts; parent_attno++)
{
HeapTuple maptup;
int i;
Oid prsId;
- int *tokens,
- ntoken;
+ int *tokens;
ListCell *c;
prsId = ((Form_pg_ts_config) GETSTRUCT(tup))->cfgparser;
tokens = getTokenTypes(prsId, stmt->tokentype);
- ntoken = list_length(stmt->tokentype);
i = 0;
foreach(c, stmt->tokentype)
BufferAccessStrategy bstrategy, bool for_wraparound, bool isTopLevel)
{
const char *stmttype;
- volatile bool all_rels,
- in_outer_xact,
+ volatile bool in_outer_xact,
use_own_xacts;
List *relations;
}
vac_strategy = bstrategy;
- /* Remember whether we are processing everything in the DB */
- all_rels = (!OidIsValid(relid) && vacstmt->relation == NULL);
-
/*
* Build list of relations to process, unless caller gave us one. (If we
* build one, we put it in vac_context for safekeeping.)
TupleTableSlot * /* return: a tuple or NULL */
ExecHashJoin(HashJoinState *node)
{
- EState *estate;
PlanState *outerNode;
HashState *hashNode;
List *joinqual;
/*
* get information from HashJoin node
*/
- estate = node->js.ps.state;
joinqual = node->js.joinqual;
otherqual = node->js.ps.qual;
hashNode = (HashState *) innerPlanState(node);
TupleTableSlot *
ExecMergeJoin(MergeJoinState *node)
{
- EState *estate;
List *joinqual;
List *otherqual;
bool qualResult;
/*
* get information from node
*/
- estate = node->js.ps.state;
innerPlan = innerPlanState(node);
outerPlan = outerPlanState(node);
econtext = node->js.ps.ps_ExprContext;
PlanState *innerPlan = innerPlanState(node);
RecursiveUnion *plan = (RecursiveUnion *) node->ps.plan;
TupleTableSlot *slot;
- RUHashEntry entry;
bool isnew;
/* 1. Evaluate non-recursive term */
if (plan->numCols > 0)
{
/* Find or build hashtable entry for this tuple's group */
- entry = (RUHashEntry)
- LookupTupleHashEntry(node->hashtable, slot, &isnew);
+ LookupTupleHashEntry(node->hashtable, slot, &isnew);
/* Must reset temp context after each hashtable lookup */
MemoryContextReset(node->tempContext);
/* Ignore tuple if already seen */
if (plan->numCols > 0)
{
/* Find or build hashtable entry for this tuple's group */
- entry = (RUHashEntry)
- LookupTupleHashEntry(node->hashtable, slot, &isnew);
+ LookupTupleHashEntry(node->hashtable, slot, &isnew);
/* Must reset temp context after each hashtable lookup */
MemoryContextReset(node->tempContext);
/* Ignore tuple if already seen */
UserMapping *
GetUserMapping(Oid userid, Oid serverid)
{
- Form_pg_user_mapping umform;
Datum datum;
HeapTuple tp;
bool isnull;
errmsg("user mapping not found for \"%s\"",
MappingUserName(userid))));
- umform = (Form_pg_user_mapping) GETSTRUCT(tp);
-
um = (UserMapping *) palloc(sizeof(UserMapping));
um->userid = userid;
um->serverid = serverid;
pg_GSS_error(int severity, char *errmsg, OM_uint32 maj_stat, OM_uint32 min_stat)
{
gss_buffer_desc gmsg;
- OM_uint32 lmaj_s,
- lmin_s,
+ OM_uint32 lmin_s,
msg_ctx;
char msg_major[128],
msg_minor[128];
/* Fetch major status message */
msg_ctx = 0;
- lmaj_s = gss_display_status(&lmin_s, maj_stat, GSS_C_GSS_CODE,
+ gss_display_status(&lmin_s, maj_stat, GSS_C_GSS_CODE,
GSS_C_NO_OID, &msg_ctx, &gmsg);
strlcpy(msg_major, gmsg.value, sizeof(msg_major));
gss_release_buffer(&lmin_s, &gmsg);
/* Fetch mechanism minor status message */
msg_ctx = 0;
- lmaj_s = gss_display_status(&lmin_s, min_stat, GSS_C_MECH_CODE,
+ gss_display_status(&lmin_s, min_stat, GSS_C_MECH_CODE,
GSS_C_NO_OID, &msg_ctx, &gmsg);
strlcpy(msg_minor, gmsg.value, sizeof(msg_minor));
gss_release_buffer(&lmin_s, &gmsg);
Chromosome *kid;
Pool *pool;
int pool_size,
- number_generations,
- status_interval;
+ number_generations;
+#ifdef GEQO_DEBUG
+ int status_interval;
+#endif
Gene *best_tour;
RelOptInfo *best_rel;
#if defined(ERX)
Edge *edge_table; /* list of edges */
int edge_failures = 0;
- float difference;
#endif
#if defined(CX) || defined(PX) || defined(OX1) || defined(OX2)
City *city_table; /* list of cities */
/* set GA parameters */
pool_size = gimme_pool_size(number_of_rels);
number_generations = gimme_number_generations(pool_size);
+#ifdef GEQO_DEBUG
status_interval = 10;
+#endif
/* allocate genetic pool memory */
pool = alloc_pool(root, pool_size, number_of_rels);
#if defined (ERX)
/* EDGE RECOMBINATION CROSSOVER */
- difference = gimme_edge_table(root, momma->string, daddy->string, pool->string_length, edge_table);
+ gimme_edge_table(root, momma->string, daddy->string, pool->string_length, edge_table);
kid = momma;
if (column->collClause)
{
Form_pg_type typtup = (Form_pg_type) GETSTRUCT(ctype);
- Oid collOid;
- collOid = LookupCollation(cxt->pstate,
+ LookupCollation(cxt->pstate,
column->collClause->collname,
column->collClause->location);
/* Complain if COLLATE is applied to an uncollatable type */
List *action)
{
Relation event_relation;
- Oid ruleId;
int event_attno;
ListCell *l;
Query *query;
/* discard rule if it's null action and not INSTEAD; it's a no-op */
if (action != NIL || is_instead)
{
- ruleId = InsertRule(rulename,
+ InsertRule(rulename,
event_type,
event_relid,
event_attno,
ResolveRecoveryConflictWithLock(Oid dbOid, Oid relOid)
{
VirtualTransactionId *backends;
- bool report_memory_error = false;
bool lock_acquired = false;
int num_attempts = 0;
LOCKTAG locktag;
if (++num_attempts < 3)
backends = GetLockConflicts(&locktag, AccessExclusiveLock);
else
- {
backends = GetConflictingVirtualXIDs(InvalidTransactionId,
InvalidOid);
- report_memory_error = true;
- }
ResolveRecoveryConflictWithVirtualXIDs(backends,
PROCSIG_RECOVERY_CONFLICT_LOCK);
mdimmedsync(SMgrRelation reln, ForkNumber forknum)
{
MdfdVec *v;
- BlockNumber curnblk;
/*
* NOTE: mdnblocks makes sure we have opened all active segments, so that
* fsync loop will get them all!
*/
- curnblk = mdnblocks(reln, forknum);
+ mdnblocks(reln, forknum);
v = mdopen(reln, forknum, EXTENSION_FAIL);
Relation fk_rel;
Relation pk_rel;
HeapTuple new_row;
- HeapTuple old_row;
Buffer new_row_buf;
RI_QueryKey qkey;
SPIPlanPtr qplan;
if (TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event))
{
- old_row = trigdata->tg_trigtuple;
new_row = trigdata->tg_newtuple;
new_row_buf = trigdata->tg_newtuplebuf;
}
else
{
- old_row = NULL;
new_row = trigdata->tg_trigtuple;
new_row_buf = trigdata->tg_trigtuplebuf;
}
List *args = (List *) PG_GETARG_POINTER(2);
int varRelid = PG_GETARG_INT32(3);
VariableStatData vardata;
- Node *variable;
Node *other;
bool varonleft;
Datum constval;
ReleaseVariableStats(vardata);
return result;
}
- variable = (Node *) linitial(args);
/*
* If the constant is NULL, assume operator is strict and return zero, ie,
double nd1;
double nd2;
Form_pg_statistic stats1 = NULL;
- Form_pg_statistic stats2 = NULL;
bool have_mcvs1 = false;
Datum *values1 = NULL;
int nvalues1 = 0;
if (HeapTupleIsValid(vardata2->statsTuple))
{
- stats2 = (Form_pg_statistic) GETSTRUCT(vardata2->statsTuple);
have_mcvs2 = get_attstatsslot(vardata2->statsTuple,
vardata2->atttype,
vardata2->atttypmod,
Datum tmin = 0;
Datum tmax = 0;
bool have_data = false;
- Form_pg_statistic stats;
int16 typLen;
bool typByVal;
Datum *values;
/* no stats available, so default result */
return false;
}
- stats = (Form_pg_statistic) GETSTRUCT(vardata->statsTuple);
get_typlenbyval(vardata->atttype, &typLen, &typByVal);
TableInfo *
getSchemaData(int *numTablesPtr)
{
- NamespaceInfo *nsinfo;
ExtensionInfo *extinfo;
- AggInfo *agginfo;
InhInfo *inhinfo;
- RuleInfo *ruleinfo;
- ProcLangInfo *proclanginfo;
- CastInfo *castinfo;
- OpclassInfo *opcinfo;
- OpfamilyInfo *opfinfo;
CollInfo *collinfo;
- ConvInfo *convinfo;
- TSParserInfo *prsinfo;
- TSTemplateInfo *tmplinfo;
- TSDictInfo *dictinfo;
- TSConfigInfo *cfginfo;
- FdwInfo *fdwinfo;
- ForeignServerInfo *srvinfo;
- DefaultACLInfo *daclinfo;
int numNamespaces;
int numExtensions;
int numAggregates;
if (g_verbose)
write_msg(NULL, "reading schemas\n");
- nsinfo = getNamespaces(&numNamespaces);
+ getNamespaces(&numNamespaces);
if (g_verbose)
write_msg(NULL, "reading extensions\n");
/* this must be after getFuncs, too */
if (g_verbose)
write_msg(NULL, "reading procedural languages\n");
- proclanginfo = getProcLangs(&numProcLangs);
+ getProcLangs(&numProcLangs);
if (g_verbose)
write_msg(NULL, "reading user-defined aggregate functions\n");
- agginfo = getAggregates(&numAggregates);
+ getAggregates(&numAggregates);
if (g_verbose)
write_msg(NULL, "reading user-defined operators\n");
if (g_verbose)
write_msg(NULL, "reading user-defined operator classes\n");
- opcinfo = getOpclasses(&numOpclasses);
+ getOpclasses(&numOpclasses);
if (g_verbose)
write_msg(NULL, "reading user-defined operator families\n");
- opfinfo = getOpfamilies(&numOpfamilies);
+ getOpfamilies(&numOpfamilies);
if (g_verbose)
write_msg(NULL, "reading user-defined text search parsers\n");
- prsinfo = getTSParsers(&numTSParsers);
+ getTSParsers(&numTSParsers);
if (g_verbose)
write_msg(NULL, "reading user-defined text search templates\n");
- tmplinfo = getTSTemplates(&numTSTemplates);
+ getTSTemplates(&numTSTemplates);
if (g_verbose)
write_msg(NULL, "reading user-defined text search dictionaries\n");
- dictinfo = getTSDictionaries(&numTSDicts);
+ getTSDictionaries(&numTSDicts);
if (g_verbose)
write_msg(NULL, "reading user-defined text search configurations\n");
- cfginfo = getTSConfigurations(&numTSConfigs);
+ getTSConfigurations(&numTSConfigs);
if (g_verbose)
write_msg(NULL, "reading user-defined foreign-data wrappers\n");
- fdwinfo = getForeignDataWrappers(&numForeignDataWrappers);
+ getForeignDataWrappers(&numForeignDataWrappers);
if (g_verbose)
write_msg(NULL, "reading user-defined foreign servers\n");
- srvinfo = getForeignServers(&numForeignServers);
+ getForeignServers(&numForeignServers);
if (g_verbose)
write_msg(NULL, "reading default privileges\n");
- daclinfo = getDefaultACLs(&numDefaultACLs);
+ getDefaultACLs(&numDefaultACLs);
if (g_verbose)
write_msg(NULL, "reading user-defined collations\n");
if (g_verbose)
write_msg(NULL, "reading user-defined conversions\n");
- convinfo = getConversions(&numConversions);
+ getConversions(&numConversions);
if (g_verbose)
write_msg(NULL, "reading type casts\n");
- castinfo = getCasts(&numCasts);
+ getCasts(&numCasts);
if (g_verbose)
write_msg(NULL, "reading user-defined tables\n");
if (g_verbose)
write_msg(NULL, "reading rewrite rules\n");
- ruleinfo = getRules(&numRules);
+ getRules(&numRules);
/*
* Identify extension member objects and mark them as not to be dumped.
static void
_ReadExtraToc(ArchiveHandle *AH, TocEntry *te)
{
- int junk;
lclTocEntry *ctx = (lclTocEntry *) te->formatData;
if (ctx == NULL)
* dump it at all.
*/
if (AH->version < K_VERS_1_7)
- junk = ReadInt(AH);
+ ReadInt(AH);
}
/*
char *typmodin;
char *typmodout;
char *typanalyze;
- Oid typinputoid;
- Oid typoutputoid;
Oid typreceiveoid;
Oid typsendoid;
Oid typmodinoid;
appendPQExpBuffer(query, "SELECT typlen, "
"typinput, typoutput, typreceive, typsend, "
"typmodin, typmodout, typanalyze, "
- "typinput::pg_catalog.oid AS typinputoid, "
- "typoutput::pg_catalog.oid AS typoutputoid, "
"typreceive::pg_catalog.oid AS typreceiveoid, "
"typsend::pg_catalog.oid AS typsendoid, "
"typmodin::pg_catalog.oid AS typmodinoid, "
appendPQExpBuffer(query, "SELECT typlen, "
"typinput, typoutput, typreceive, typsend, "
"typmodin, typmodout, typanalyze, "
- "typinput::pg_catalog.oid AS typinputoid, "
- "typoutput::pg_catalog.oid AS typoutputoid, "
"typreceive::pg_catalog.oid AS typreceiveoid, "
"typsend::pg_catalog.oid AS typsendoid, "
"typmodin::pg_catalog.oid AS typmodinoid, "
appendPQExpBuffer(query, "SELECT typlen, "
"typinput, typoutput, typreceive, typsend, "
"typmodin, typmodout, typanalyze, "
- "typinput::pg_catalog.oid AS typinputoid, "
- "typoutput::pg_catalog.oid AS typoutputoid, "
"typreceive::pg_catalog.oid AS typreceiveoid, "
"typsend::pg_catalog.oid AS typsendoid, "
"typmodin::pg_catalog.oid AS typmodinoid, "
"typinput, typoutput, typreceive, typsend, "
"'-' AS typmodin, '-' AS typmodout, "
"typanalyze, "
- "typinput::pg_catalog.oid AS typinputoid, "
- "typoutput::pg_catalog.oid AS typoutputoid, "
"typreceive::pg_catalog.oid AS typreceiveoid, "
"typsend::pg_catalog.oid AS typsendoid, "
"0 AS typmodinoid, 0 AS typmodoutoid, "
"typinput, typoutput, typreceive, typsend, "
"'-' AS typmodin, '-' AS typmodout, "
"'-' AS typanalyze, "
- "typinput::pg_catalog.oid AS typinputoid, "
- "typoutput::pg_catalog.oid AS typoutputoid, "
"typreceive::pg_catalog.oid AS typreceiveoid, "
"typsend::pg_catalog.oid AS typsendoid, "
"0 AS typmodinoid, 0 AS typmodoutoid, "
"'-' AS typreceive, '-' AS typsend, "
"'-' AS typmodin, '-' AS typmodout, "
"'-' AS typanalyze, "
- "typinput::pg_catalog.oid AS typinputoid, "
- "typoutput::pg_catalog.oid AS typoutputoid, "
"0 AS typreceiveoid, 0 AS typsendoid, "
"0 AS typmodinoid, 0 AS typmodoutoid, "
"0 AS typanalyzeoid, "
"'-' AS typreceive, '-' AS typsend, "
"'-' AS typmodin, '-' AS typmodout, "
"'-' AS typanalyze, "
- "typinput::oid AS typinputoid, "
- "typoutput::oid AS typoutputoid, "
"0 AS typreceiveoid, 0 AS typsendoid, "
"0 AS typmodinoid, 0 AS typmodoutoid, "
"0 AS typanalyzeoid, "
"'-' AS typreceive, '-' AS typsend, "
"'-' AS typmodin, '-' AS typmodout, "
"'-' AS typanalyze, "
- "typinput::oid AS typinputoid, "
- "typoutput::oid AS typoutputoid, "
"0 AS typreceiveoid, 0 AS typsendoid, "
"0 AS typmodinoid, 0 AS typmodoutoid, "
"0 AS typanalyzeoid, "
"'-' AS typreceive, '-' AS typsend, "
"'-' AS typmodin, '-' AS typmodout, "
"'-' AS typanalyze, "
- "typinput::oid AS typinputoid, "
- "typoutput::oid AS typoutputoid, "
"0 AS typreceiveoid, 0 AS typsendoid, "
"0 AS typmodinoid, 0 AS typmodoutoid, "
"0 AS typanalyzeoid, "
typmodin = PQgetvalue(res, 0, PQfnumber(res, "typmodin"));
typmodout = PQgetvalue(res, 0, PQfnumber(res, "typmodout"));
typanalyze = PQgetvalue(res, 0, PQfnumber(res, "typanalyze"));
- typinputoid = atooid(PQgetvalue(res, 0, PQfnumber(res, "typinputoid")));
- typoutputoid = atooid(PQgetvalue(res, 0, PQfnumber(res, "typoutputoid")));
typreceiveoid = atooid(PQgetvalue(res, 0, PQfnumber(res, "typreceiveoid")));
typsendoid = atooid(PQgetvalue(res, 0, PQfnumber(res, "typsendoid")));
typmodinoid = atooid(PQgetvalue(res, 0, PQfnumber(res, "typmodinoid")));
PQExpBuffer labelq;
PGresult *res;
int ntups;
- int i_collname;
int i_collcollate;
int i_collctype;
- const char *collname;
const char *collcollate;
const char *collctype;
selectSourceSchema(collinfo->dobj.namespace->dobj.name);
/* Get conversion-specific details */
- appendPQExpBuffer(query, "SELECT collname, "
+ appendPQExpBuffer(query, "SELECT "
"collcollate, "
"collctype "
"FROM pg_catalog.pg_collation c "
exit_nicely();
}
- i_collname = PQfnumber(res, "collname");
i_collcollate = PQfnumber(res, "collcollate");
i_collctype = PQfnumber(res, "collctype");
- collname = PQgetvalue(res, 0, i_collname);
collcollate = PQgetvalue(res, 0, i_collcollate);
collctype = PQgetvalue(res, 0, i_collctype);
PQExpBuffer labelq;
PGresult *res;
int ntups;
- int i_conname;
int i_conforencoding;
int i_contoencoding;
int i_conproc;
int i_condefault;
- const char *conname;
const char *conforencoding;
const char *contoencoding;
const char *conproc;
selectSourceSchema(convinfo->dobj.namespace->dobj.name);
/* Get conversion-specific details */
- appendPQExpBuffer(query, "SELECT conname, "
+ appendPQExpBuffer(query, "SELECT "
"pg_catalog.pg_encoding_to_char(conforencoding) AS conforencoding, "
"pg_catalog.pg_encoding_to_char(contoencoding) AS contoencoding, "
"conproc, condefault "
exit_nicely();
}
- i_conname = PQfnumber(res, "conname");
i_conforencoding = PQfnumber(res, "conforencoding");
i_contoencoding = PQfnumber(res, "contoencoding");
i_conproc = PQfnumber(res, "conproc");
i_condefault = PQfnumber(res, "condefault");
- conname = PQgetvalue(res, 0, i_conname);
conforencoding = PQgetvalue(res, 0, i_conforencoding);
contoencoding = PQgetvalue(res, 0, i_contoencoding);
conproc = PQgetvalue(res, 0, i_conproc);
char *storage;
int j,
k;
- bool toast_set = false;
char *srvname;
char *ftoptions = NULL;
selectSourceSchema(tbinfo->dobj.namespace->dobj.name);
if (binary_upgrade)
- toast_set = binary_upgrade_set_type_oids_by_rel_oid(q,
+ binary_upgrade_set_type_oids_by_rel_oid(q,
tbinfo->dobj.catId.oid);
/* Is it a table or a view? */
bool output_clean = false;
bool roles_only = false;
bool tablespaces_only = false;
- bool schema_only = false;
PGconn *conn;
int encoding;
const char *std_strings;
break;
case 's':
- schema_only = true;
appendPQExpBuffer(pgdumpopts, " -s");
break;
i_rolinherit,
i_rolcreaterole,
i_rolcreatedb,
- i_rolcatupdate,
i_rolcanlogin,
i_rolconnlimit,
i_rolpassword,
if (server_version >= 90100)
printfPQExpBuffer(buf,
"SELECT oid, rolname, rolsuper, rolinherit, "
- "rolcreaterole, rolcreatedb, rolcatupdate, "
+ "rolcreaterole, rolcreatedb, "
"rolcanlogin, rolconnlimit, rolpassword, "
"rolvaliduntil, rolreplication, "
"pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment "
else if (server_version >= 80200)
printfPQExpBuffer(buf,
"SELECT oid, rolname, rolsuper, rolinherit, "
- "rolcreaterole, rolcreatedb, rolcatupdate, "
+ "rolcreaterole, rolcreatedb, "
"rolcanlogin, rolconnlimit, rolpassword, "
"rolvaliduntil, false as rolreplication, "
"pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment "
else if (server_version >= 80100)
printfPQExpBuffer(buf,
"SELECT oid, rolname, rolsuper, rolinherit, "
- "rolcreaterole, rolcreatedb, rolcatupdate, "
+ "rolcreaterole, rolcreatedb, "
"rolcanlogin, rolconnlimit, rolpassword, "
"rolvaliduntil, false as rolreplication, "
"null as rolcomment "
"true as rolinherit, "
"usesuper as rolcreaterole, "
"usecreatedb as rolcreatedb, "
- "usecatupd as rolcatupdate, "
"true as rolcanlogin, "
"-1 as rolconnlimit, "
"passwd as rolpassword, "
"true as rolinherit, "
"false as rolcreaterole, "
"false as rolcreatedb, "
- "false as rolcatupdate, "
"false as rolcanlogin, "
"-1 as rolconnlimit, "
"null::text as rolpassword, "
i_rolinherit = PQfnumber(res, "rolinherit");
i_rolcreaterole = PQfnumber(res, "rolcreaterole");
i_rolcreatedb = PQfnumber(res, "rolcreatedb");
- i_rolcatupdate = PQfnumber(res, "rolcatupdate");
i_rolcanlogin = PQfnumber(res, "rolcanlogin");
i_rolconnlimit = PQfnumber(res, "rolconnlimit");
i_rolpassword = PQfnumber(res, "rolpassword");
psql_scan_slash_command(PsqlScanState state)
{
PQExpBufferData mybuf;
- int lexresult;
/* Must be scanning already */
psql_assert(state->scanbufhandle);
BEGIN(xslashcmd);
/* And lex. */
- lexresult = yylex();
+ yylex();
/* There are no possible errors in this lex state... */
void
psql_scan_slash_command_end(PsqlScanState state)
{
- int lexresult;
-
/* Must be scanning already */
psql_assert(state->scanbufhandle);
BEGIN(xslashend);
/* And lex. */
- lexresult = yylex();
+ yylex();
/* There are no possible errors in this lex state... */
}
for (;;)
{
- enum ECPGttype type,
- dummy_type;
- void *ptr,
- *dummy_ptr;
- long dummy;
+ enum ECPGttype type;
+ void *ptr;
/* variable type */
type = va_arg(args, enum ECPGttype);
/* rest of variable parameters */
ptr = va_arg(args, void *);
- dummy = va_arg(args, long);
- dummy = va_arg(args, long);
- dummy = va_arg(args, long);
+ va_arg(args, long); /* skip args */
+ va_arg(args, long);
+ va_arg(args, long);
/* variable indicator */
- dummy_type = va_arg(args, enum ECPGttype);
- dummy_ptr = va_arg(args, void *);
- dummy = va_arg(args, long);
- dummy = va_arg(args, long);
- dummy = va_arg(args, long);
+ va_arg(args, enum ECPGttype);
+ va_arg(args, void *); /* skip args */
+ va_arg(args, long);
+ va_arg(args, long);
+ va_arg(args, long);
switch (type)
{
pg_GSS_error_int(PQExpBuffer str, const char *mprefix,
OM_uint32 stat, int type)
{
- OM_uint32 lmaj_s,
- lmin_s;
+ OM_uint32 lmin_s;
gss_buffer_desc lmsg;
OM_uint32 msg_ctx = 0;
do
{
- lmaj_s = gss_display_status(&lmin_s, stat, type,
+ gss_display_status(&lmin_s, stat, type,
GSS_C_NO_OID, &msg_ctx, &lmsg);
appendPQExpBuffer(str, "%s: %s\n", mprefix, (char *) lmsg.value);
gss_release_buffer(&lmin_s, &lmsg);
{
PLpgSQL_var *curvar;
char *curname = NULL;
- const char *portalname;
PLpgSQL_expr *query;
ParamListInfo paramLI;
Portal portal;
if (portal == NULL)
elog(ERROR, "could not open cursor: %s",
SPI_result_code_string(SPI_result));
- portalname = portal->name;
/* don't need paramlist any more */
if (paramLI)