{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp(defel->defname, "MAXLEN") == 0)
+ if (strcmp(defel->defname, "maxlen") == 0)
{
d->maxlen = atoi(defGetString(defel));
}
- else if (pg_strcasecmp(defel->defname, "REJECTLONG") == 0)
+ else if (strcmp(defel->defname, "rejectlong") == 0)
{
d->rejectlong = defGetBoolean(defel);
}
{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp(defel->defname, "MATCHORIG") == 0)
+ if (strcmp(defel->defname, "matchorig") == 0)
{
d->matchorig = defGetBoolean(defel);
}
- else if (pg_strcasecmp(defel->defname, "KEEPORIG") == 0)
+ else if (strcmp(defel->defname, "keeporig") == 0)
{
d->keeporig = defGetBoolean(defel);
}
- else if (pg_strcasecmp(defel->defname, "MATCHSYNONYMS") == 0)
+ else if (strcmp(defel->defname, "matchsynonyms") == 0)
{
d->matchsynonyms = defGetBoolean(defel);
}
- else if (pg_strcasecmp(defel->defname, "KEEPSYNONYMS") == 0)
+ else if (strcmp(defel->defname, "keepsynonyms") == 0)
{
d->keepsynonyms = defGetBoolean(defel);
}
- else if (pg_strcasecmp(defel->defname, "RULES") == 0)
+ else if (strcmp(defel->defname, "rules") == 0)
{
/* we can't read the rules before parsing all options! */
filename = defGetString(defel);
{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp("Rules", defel->defname) == 0)
+ if (strcmp(defel->defname, "rules") == 0)
{
if (fileloaded)
ereport(ERROR,
+ These option names are recognized case-insensitively.
Any unspecified options receive these defaults:
}
else if (def->defnamespace == NULL)
continue;
- else if (pg_strcasecmp(def->defnamespace, namspace) != 0)
+ else if (strcmp(def->defnamespace, namspace) != 0)
continue;
kw_len = strlen(def->defname);
if (text_len > kw_len && text_str[kw_len] == '=' &&
- pg_strncasecmp(text_str, def->defname, kw_len) == 0)
+ strncmp(text_str, def->defname, kw_len) == 0)
break;
}
if (!cell)
{
for (i = 0; validnsps[i]; i++)
{
- if (pg_strcasecmp(def->defnamespace,
- validnsps[i]) == 0)
+ if (strcmp(def->defnamespace, validnsps[i]) == 0)
{
valid = true;
break;
def->defnamespace)));
}
- if (ignoreOids && pg_strcasecmp(def->defname, "oids") == 0)
+ if (ignoreOids && strcmp(def->defname, "oids") == 0)
continue;
/* ignore if not in the same namespace */
}
else if (def->defnamespace == NULL)
continue;
- else if (pg_strcasecmp(def->defnamespace, namspace) != 0)
+ else if (strcmp(def->defnamespace, namspace) != 0)
continue;
/*
int kw_len = reloptions[j].gen->namelen;
if (text_len > kw_len && text_str[kw_len] == '=' &&
- pg_strncasecmp(text_str, reloptions[j].gen->name,
- kw_len) == 0)
+ strncmp(text_str, reloptions[j].gen->name, kw_len) == 0)
{
parse_one_reloption(&reloptions[j], text_str, text_len,
validate);
for (j = 0; j < numelems; j++)
{
- if (pg_strcasecmp(options[i].gen->name, elems[j].optname) == 0)
+ if (strcmp(options[i].gen->name, elems[j].optname) == 0)
{
relopt_string *optstring;
char *itempos = ((char *) rdopts) + elems[j].offset;
for (i = 0; relOpts[i]; i++)
{
- if (pg_strncasecmp(relOpts[i]->name,
- def->defname,
- relOpts[i]->namelen + 1) == 0)
+ if (strncmp(relOpts[i]->name,
+ def->defname,
+ relOpts[i]->namelen + 1) == 0)
{
if (lockmode < relOpts[i]->lockmode)
lockmode = relOpts[i]->lockmode;
* sfunc1, stype1, and initcond1 are accepted as obsolete spellings
* for sfunc, stype, initcond.
*/
- if (pg_strcasecmp(defel->defname, "sfunc") == 0)
+ if (strcmp(defel->defname, "sfunc") == 0)
transfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "sfunc1") == 0)
+ else if (strcmp(defel->defname, "sfunc1") == 0)
transfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "finalfunc") == 0)
+ else if (strcmp(defel->defname, "finalfunc") == 0)
finalfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "combinefunc") == 0)
+ else if (strcmp(defel->defname, "combinefunc") == 0)
combinefuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "serialfunc") == 0)
+ else if (strcmp(defel->defname, "serialfunc") == 0)
serialfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "deserialfunc") == 0)
+ else if (strcmp(defel->defname, "deserialfunc") == 0)
deserialfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "msfunc") == 0)
+ else if (strcmp(defel->defname, "msfunc") == 0)
mtransfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "minvfunc") == 0)
+ else if (strcmp(defel->defname, "minvfunc") == 0)
minvtransfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "mfinalfunc") == 0)
+ else if (strcmp(defel->defname, "mfinalfunc") == 0)
mfinalfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "finalfunc_extra") == 0)
+ else if (strcmp(defel->defname, "finalfunc_extra") == 0)
finalfuncExtraArgs = defGetBoolean(defel);
- else if (pg_strcasecmp(defel->defname, "mfinalfunc_extra") == 0)
+ else if (strcmp(defel->defname, "mfinalfunc_extra") == 0)
mfinalfuncExtraArgs = defGetBoolean(defel);
- else if (pg_strcasecmp(defel->defname, "finalfunc_modify") == 0)
+ else if (strcmp(defel->defname, "finalfunc_modify") == 0)
finalfuncModify = extractModify(defel);
- else if (pg_strcasecmp(defel->defname, "mfinalfunc_modify") == 0)
+ else if (strcmp(defel->defname, "mfinalfunc_modify") == 0)
mfinalfuncModify = extractModify(defel);
- else if (pg_strcasecmp(defel->defname, "sortop") == 0)
+ else if (strcmp(defel->defname, "sortop") == 0)
sortoperatorName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "basetype") == 0)
+ else if (strcmp(defel->defname, "basetype") == 0)
baseType = defGetTypeName(defel);
- else if (pg_strcasecmp(defel->defname, "hypothetical") == 0)
+ else if (strcmp(defel->defname, "hypothetical") == 0)
{
if (defGetBoolean(defel))
{
aggKind = AGGKIND_HYPOTHETICAL;
}
}
- else if (pg_strcasecmp(defel->defname, "stype") == 0)
+ else if (strcmp(defel->defname, "stype") == 0)
transType = defGetTypeName(defel);
- else if (pg_strcasecmp(defel->defname, "stype1") == 0)
+ else if (strcmp(defel->defname, "stype1") == 0)
transType = defGetTypeName(defel);
- else if (pg_strcasecmp(defel->defname, "sspace") == 0)
+ else if (strcmp(defel->defname, "sspace") == 0)
transSpace = defGetInt32(defel);
- else if (pg_strcasecmp(defel->defname, "mstype") == 0)
+ else if (strcmp(defel->defname, "mstype") == 0)
mtransType = defGetTypeName(defel);
- else if (pg_strcasecmp(defel->defname, "msspace") == 0)
+ else if (strcmp(defel->defname, "msspace") == 0)
mtransSpace = defGetInt32(defel);
- else if (pg_strcasecmp(defel->defname, "initcond") == 0)
+ else if (strcmp(defel->defname, "initcond") == 0)
initval = defGetString(defel);
- else if (pg_strcasecmp(defel->defname, "initcond1") == 0)
+ else if (strcmp(defel->defname, "initcond1") == 0)
initval = defGetString(defel);
- else if (pg_strcasecmp(defel->defname, "minitcond") == 0)
+ else if (strcmp(defel->defname, "minitcond") == 0)
minitval = defGetString(defel);
- else if (pg_strcasecmp(defel->defname, "parallel") == 0)
+ else if (strcmp(defel->defname, "parallel") == 0)
parallel = defGetString(defel);
else
ereport(WARNING,
if (parallel)
{
- if (pg_strcasecmp(parallel, "safe") == 0)
+ if (strcmp(parallel, "safe") == 0)
proparallel = PROPARALLEL_SAFE;
- else if (pg_strcasecmp(parallel, "restricted") == 0)
+ else if (strcmp(parallel, "restricted") == 0)
proparallel = PROPARALLEL_RESTRICTED;
- else if (pg_strcasecmp(parallel, "unsafe") == 0)
+ else if (strcmp(parallel, "unsafe") == 0)
proparallel = PROPARALLEL_UNSAFE;
else
ereport(ERROR,
DefElem *defel = lfirst_node(DefElem, pl);
DefElem **defelp;
- if (pg_strcasecmp(defel->defname, "from") == 0)
+ if (strcmp(defel->defname, "from") == 0)
defelp = &fromEl;
- else if (pg_strcasecmp(defel->defname, "locale") == 0)
+ else if (strcmp(defel->defname, "locale") == 0)
defelp = &localeEl;
- else if (pg_strcasecmp(defel->defname, "lc_collate") == 0)
+ else if (strcmp(defel->defname, "lc_collate") == 0)
defelp = &lccollateEl;
- else if (pg_strcasecmp(defel->defname, "lc_ctype") == 0)
+ else if (strcmp(defel->defname, "lc_ctype") == 0)
defelp = &lcctypeEl;
- else if (pg_strcasecmp(defel->defname, "provider") == 0)
+ else if (strcmp(defel->defname, "provider") == 0)
defelp = &providerEl;
- else if (pg_strcasecmp(defel->defname, "version") == 0)
+ else if (strcmp(defel->defname, "version") == 0)
defelp = &versionEl;
else
{
{
DefElem *defel = (DefElem *) lfirst(pl);
- if (pg_strcasecmp(defel->defname, "leftarg") == 0)
+ if (strcmp(defel->defname, "leftarg") == 0)
{
typeName1 = defGetTypeName(defel);
if (typeName1->setof)
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
errmsg("SETOF type not allowed for operator argument")));
}
- else if (pg_strcasecmp(defel->defname, "rightarg") == 0)
+ else if (strcmp(defel->defname, "rightarg") == 0)
{
typeName2 = defGetTypeName(defel);
if (typeName2->setof)
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
errmsg("SETOF type not allowed for operator argument")));
}
- else if (pg_strcasecmp(defel->defname, "procedure") == 0)
+ else if (strcmp(defel->defname, "procedure") == 0)
functionName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "commutator") == 0)
+ else if (strcmp(defel->defname, "commutator") == 0)
commutatorName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "negator") == 0)
+ else if (strcmp(defel->defname, "negator") == 0)
negatorName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "restrict") == 0)
+ else if (strcmp(defel->defname, "restrict") == 0)
restrictionName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "join") == 0)
+ else if (strcmp(defel->defname, "join") == 0)
joinName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "hashes") == 0)
+ else if (strcmp(defel->defname, "hashes") == 0)
canHash = defGetBoolean(defel);
- else if (pg_strcasecmp(defel->defname, "merges") == 0)
+ else if (strcmp(defel->defname, "merges") == 0)
canMerge = defGetBoolean(defel);
/* These obsolete options are taken as meaning canMerge */
- else if (pg_strcasecmp(defel->defname, "sort1") == 0)
+ else if (strcmp(defel->defname, "sort1") == 0)
canMerge = true;
- else if (pg_strcasecmp(defel->defname, "sort2") == 0)
+ else if (strcmp(defel->defname, "sort2") == 0)
canMerge = true;
- else if (pg_strcasecmp(defel->defname, "ltcmp") == 0)
+ else if (strcmp(defel->defname, "ltcmp") == 0)
canMerge = true;
- else if (pg_strcasecmp(defel->defname, "gtcmp") == 0)
+ else if (strcmp(defel->defname, "gtcmp") == 0)
canMerge = true;
else
{
else
param = defGetQualifiedName(defel);
- if (pg_strcasecmp(defel->defname, "restrict") == 0)
+ if (strcmp(defel->defname, "restrict") == 0)
{
restrictionName = param;
updateRestriction = true;
}
- else if (pg_strcasecmp(defel->defname, "join") == 0)
+ else if (strcmp(defel->defname, "join") == 0)
{
joinName = param;
updateJoin = true;
* The rest of the options that CREATE accepts cannot be changed.
* Check for them so that we can give a meaningful error message.
*/
- else if (pg_strcasecmp(defel->defname, "leftarg") == 0 ||
- pg_strcasecmp(defel->defname, "rightarg") == 0 ||
- pg_strcasecmp(defel->defname, "procedure") == 0 ||
- pg_strcasecmp(defel->defname, "commutator") == 0 ||
- pg_strcasecmp(defel->defname, "negator") == 0 ||
- pg_strcasecmp(defel->defname, "hashes") == 0 ||
- pg_strcasecmp(defel->defname, "merges") == 0)
+ else if (strcmp(defel->defname, "leftarg") == 0 ||
+ strcmp(defel->defname, "rightarg") == 0 ||
+ strcmp(defel->defname, "procedure") == 0 ||
+ strcmp(defel->defname, "commutator") == 0 ||
+ strcmp(defel->defname, "negator") == 0 ||
+ strcmp(defel->defname, "hashes") == 0 ||
+ strcmp(defel->defname, "merges") == 0)
{
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
{
DefElem *defel = (DefElem *) lfirst(cell);
- if (pg_strcasecmp(defel->defname, "check_option") == 0)
+ if (strcmp(defel->defname, "check_option") == 0)
check_option = true;
}
{
DefElem *defel = (DefElem *) lfirst(pl);
- if (pg_strcasecmp(defel->defname, "start") == 0)
+ if (strcmp(defel->defname, "start") == 0)
{
values[Anum_pg_ts_parser_prsstart - 1] =
get_ts_parser_func(defel, Anum_pg_ts_parser_prsstart);
}
- else if (pg_strcasecmp(defel->defname, "gettoken") == 0)
+ else if (strcmp(defel->defname, "gettoken") == 0)
{
values[Anum_pg_ts_parser_prstoken - 1] =
get_ts_parser_func(defel, Anum_pg_ts_parser_prstoken);
}
- else if (pg_strcasecmp(defel->defname, "end") == 0)
+ else if (strcmp(defel->defname, "end") == 0)
{
values[Anum_pg_ts_parser_prsend - 1] =
get_ts_parser_func(defel, Anum_pg_ts_parser_prsend);
}
- else if (pg_strcasecmp(defel->defname, "headline") == 0)
+ else if (strcmp(defel->defname, "headline") == 0)
{
values[Anum_pg_ts_parser_prsheadline - 1] =
get_ts_parser_func(defel, Anum_pg_ts_parser_prsheadline);
}
- else if (pg_strcasecmp(defel->defname, "lextypes") == 0)
+ else if (strcmp(defel->defname, "lextypes") == 0)
{
values[Anum_pg_ts_parser_prslextype - 1] =
get_ts_parser_func(defel, Anum_pg_ts_parser_prslextype);
{
DefElem *defel = (DefElem *) lfirst(pl);
- if (pg_strcasecmp(defel->defname, "template") == 0)
+ if (strcmp(defel->defname, "template") == 0)
{
templId = get_ts_template_oid(defGetQualifiedName(defel), false);
}
DefElem *oldel = (DefElem *) lfirst(cell);
next = lnext(cell);
- if (pg_strcasecmp(oldel->defname, defel->defname) == 0)
+ if (strcmp(oldel->defname, defel->defname) == 0)
dictoptions = list_delete_cell(dictoptions, cell, prev);
else
prev = cell;
{
DefElem *defel = (DefElem *) lfirst(pl);
- if (pg_strcasecmp(defel->defname, "init") == 0)
+ if (strcmp(defel->defname, "init") == 0)
{
values[Anum_pg_ts_template_tmplinit - 1] =
get_ts_template_func(defel, Anum_pg_ts_template_tmplinit);
nulls[Anum_pg_ts_template_tmplinit - 1] = false;
}
- else if (pg_strcasecmp(defel->defname, "lexize") == 0)
+ else if (strcmp(defel->defname, "lexize") == 0)
{
values[Anum_pg_ts_template_tmpllexize - 1] =
get_ts_template_func(defel, Anum_pg_ts_template_tmpllexize);
{
DefElem *defel = (DefElem *) lfirst(pl);
- if (pg_strcasecmp(defel->defname, "parser") == 0)
+ if (strcmp(defel->defname, "parser") == 0)
prsOid = get_ts_parser_oid(defGetQualifiedName(defel), false);
- else if (pg_strcasecmp(defel->defname, "copy") == 0)
+ else if (strcmp(defel->defname, "copy") == 0)
sourceOid = get_ts_config_oid(defGetQualifiedName(defel), false);
else
ereport(ERROR,
j = 0;
while (list && list[j].lexid)
{
- /* XXX should we use pg_strcasecmp here? */
if (strcmp(strVal(val), list[j].alias) == 0)
{
res[i] = list[j].lexid;
DefElem *defel = (DefElem *) lfirst(pl);
DefElem **defelp;
- if (pg_strcasecmp(defel->defname, "like") == 0)
+ if (strcmp(defel->defname, "like") == 0)
defelp = &likeTypeEl;
- else if (pg_strcasecmp(defel->defname, "internallength") == 0)
+ else if (strcmp(defel->defname, "internallength") == 0)
defelp = &internalLengthEl;
- else if (pg_strcasecmp(defel->defname, "input") == 0)
+ else if (strcmp(defel->defname, "input") == 0)
defelp = &inputNameEl;
- else if (pg_strcasecmp(defel->defname, "output") == 0)
+ else if (strcmp(defel->defname, "output") == 0)
defelp = &outputNameEl;
- else if (pg_strcasecmp(defel->defname, "receive") == 0)
+ else if (strcmp(defel->defname, "receive") == 0)
defelp = &receiveNameEl;
- else if (pg_strcasecmp(defel->defname, "send") == 0)
+ else if (strcmp(defel->defname, "send") == 0)
defelp = &sendNameEl;
- else if (pg_strcasecmp(defel->defname, "typmod_in") == 0)
+ else if (strcmp(defel->defname, "typmod_in") == 0)
defelp = &typmodinNameEl;
- else if (pg_strcasecmp(defel->defname, "typmod_out") == 0)
+ else if (strcmp(defel->defname, "typmod_out") == 0)
defelp = &typmodoutNameEl;
- else if (pg_strcasecmp(defel->defname, "analyze") == 0 ||
- pg_strcasecmp(defel->defname, "analyse") == 0)
+ else if (strcmp(defel->defname, "analyze") == 0 ||
+ strcmp(defel->defname, "analyse") == 0)
defelp = &analyzeNameEl;
- else if (pg_strcasecmp(defel->defname, "category") == 0)
+ else if (strcmp(defel->defname, "category") == 0)
defelp = &categoryEl;
- else if (pg_strcasecmp(defel->defname, "preferred") == 0)
+ else if (strcmp(defel->defname, "preferred") == 0)
defelp = &preferredEl;
- else if (pg_strcasecmp(defel->defname, "delimiter") == 0)
+ else if (strcmp(defel->defname, "delimiter") == 0)
defelp = &delimiterEl;
- else if (pg_strcasecmp(defel->defname, "element") == 0)
+ else if (strcmp(defel->defname, "element") == 0)
defelp = &elemTypeEl;
- else if (pg_strcasecmp(defel->defname, "default") == 0)
+ else if (strcmp(defel->defname, "default") == 0)
defelp = &defaultValueEl;
- else if (pg_strcasecmp(defel->defname, "passedbyvalue") == 0)
+ else if (strcmp(defel->defname, "passedbyvalue") == 0)
defelp = &byValueEl;
- else if (pg_strcasecmp(defel->defname, "alignment") == 0)
+ else if (strcmp(defel->defname, "alignment") == 0)
defelp = &alignmentEl;
- else if (pg_strcasecmp(defel->defname, "storage") == 0)
+ else if (strcmp(defel->defname, "storage") == 0)
defelp = &storageEl;
- else if (pg_strcasecmp(defel->defname, "collatable") == 0)
+ else if (strcmp(defel->defname, "collatable") == 0)
defelp = &collatableEl;
else
{
{
DefElem *defel = (DefElem *) lfirst(lc);
- if (pg_strcasecmp(defel->defname, "subtype") == 0)
+ if (strcmp(defel->defname, "subtype") == 0)
{
if (OidIsValid(rangeSubtype))
ereport(ERROR,
/* we can look up the subtype name immediately */
rangeSubtype = typenameTypeId(NULL, defGetTypeName(defel));
}
- else if (pg_strcasecmp(defel->defname, "subtype_opclass") == 0)
+ else if (strcmp(defel->defname, "subtype_opclass") == 0)
{
if (rangeSubOpclassName != NIL)
ereport(ERROR,
errmsg("conflicting or redundant options")));
rangeSubOpclassName = defGetQualifiedName(defel);
}
- else if (pg_strcasecmp(defel->defname, "collation") == 0)
+ else if (strcmp(defel->defname, "collation") == 0)
{
if (rangeCollationName != NIL)
ereport(ERROR,
errmsg("conflicting or redundant options")));
rangeCollationName = defGetQualifiedName(defel);
}
- else if (pg_strcasecmp(defel->defname, "canonical") == 0)
+ else if (strcmp(defel->defname, "canonical") == 0)
{
if (rangeCanonicalName != NIL)
ereport(ERROR,
errmsg("conflicting or redundant options")));
rangeCanonicalName = defGetQualifiedName(defel);
}
- else if (pg_strcasecmp(defel->defname, "subtype_diff") == 0)
+ else if (strcmp(defel->defname, "subtype_diff") == 0)
{
if (rangeSubtypeDiffName != NIL)
ereport(ERROR,
validateWithCheckOption(const char *value)
{
if (value == NULL ||
- (pg_strcasecmp(value, "local") != 0 &&
- pg_strcasecmp(value, "cascaded") != 0))
+ (strcmp(value, "local") != 0 &&
+ strcmp(value, "cascaded") != 0))
{
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
{
DefElem *defel = (DefElem *) lfirst(cell);
- if (pg_strcasecmp(defel->defname, "check_option") == 0)
+ if (strcmp(defel->defname, "check_option") == 0)
check_option = true;
}
DefElem *def = (DefElem *) lfirst(cell);
if (def->defnamespace == NULL &&
- pg_strcasecmp(def->defname, "oids") == 0)
+ strcmp(def->defname, "oids") == 0)
{
if (!allowOids)
ereport(ERROR,
{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp("StopWords", defel->defname) == 0)
+ if (strcmp(defel->defname, "stopwords") == 0)
{
if (stoploaded)
ereport(ERROR,
readstoplist(defGetString(defel), &d->stoplist, lowerstr);
stoploaded = true;
}
- else if (pg_strcasecmp("Language", defel->defname) == 0)
+ else if (strcmp(defel->defname, "language") == 0)
{
if (d->stem)
ereport(ERROR,
{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp(defel->defname, "DictFile") == 0)
+ if (strcmp(defel->defname, "dictfile") == 0)
{
if (dictloaded)
ereport(ERROR,
"dict"));
dictloaded = true;
}
- else if (pg_strcasecmp(defel->defname, "AffFile") == 0)
+ else if (strcmp(defel->defname, "afffile") == 0)
{
if (affloaded)
ereport(ERROR,
"affix"));
affloaded = true;
}
- else if (pg_strcasecmp(defel->defname, "StopWords") == 0)
+ else if (strcmp(defel->defname, "stopwords") == 0)
{
if (stoploaded)
ereport(ERROR,
{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp("StopWords", defel->defname) == 0)
+ if (strcmp(defel->defname, "stopwords") == 0)
{
if (stoploaded)
ereport(ERROR,
readstoplist(defGetString(defel), &d->stoplist, lowerstr);
stoploaded = true;
}
- else if (pg_strcasecmp("Accept", defel->defname) == 0)
+ else if (strcmp(defel->defname, "accept") == 0)
{
if (acceptloaded)
ereport(ERROR,
{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp("Synonyms", defel->defname) == 0)
+ if (strcmp(defel->defname, "synonyms") == 0)
filename = defGetString(defel);
- else if (pg_strcasecmp("CaseSensitive", defel->defname) == 0)
+ else if (strcmp(defel->defname, "casesensitive") == 0)
case_sensitive = defGetBoolean(defel);
else
ereport(ERROR,
{
DefElem *defel = (DefElem *) lfirst(l);
- if (pg_strcasecmp("DictFile", defel->defname) == 0)
+ if (strcmp(defel->defname, "dictfile") == 0)
{
if (fileloaded)
ereport(ERROR,
thesaurusRead(defGetString(defel), d);
fileloaded = true;
}
- else if (pg_strcasecmp("Dictionary", defel->defname) == 0)
+ else if (strcmp(defel->defname, "dictionary") == 0)
{
if (subdictname)
ereport(ERROR,
* code block.
*/
#define HAVE_RELOPTION(optname, option) \
- (pg_strncasecmp(option.gen->name, optname, option.gen->namelen + 1) == 0)
+ (strncmp(option.gen->name, optname, option.gen->namelen + 1) == 0)
#define HANDLE_INT_RELOPTION(optname, var, option, wasset) \
do { \
END IF;
RETURN NULL;
END$$;
-CREATE AGGREGATE balk(
- BASETYPE = int4,
+CREATE AGGREGATE balk(int4)
+(
SFUNC = balkifnull(int8, int4),
STYPE = int8,
- "PARALLEL" = SAFE,
- INITCOND = '0');
+ PARALLEL = SAFE,
+ INITCOND = '0'
+);
SELECT balk(hundred) FROM tenk1;
balk
------
END IF;
RETURN NULL;
END$$;
-CREATE AGGREGATE balk(
- BASETYPE = int4,
+CREATE AGGREGATE balk(int4)
+(
SFUNC = int4_sum(int8, int4),
STYPE = int8,
COMBINEFUNC = balkifnull(int8, int8),
- "PARALLEL" = SAFE,
+ PARALLEL = SAFE,
INITCOND = '0'
);
-- force use of parallelism
CREATE TEXT SEARCH TEMPLATE alt_ts_temp2 (lexize=dsimple_lexize);
ALTER TEXT SEARCH TEMPLATE alt_ts_temp2 SET SCHEMA alt_nsp2; -- failed (name conflict)
ERROR: text search template "alt_ts_temp2" already exists in schema "alt_nsp2"
+-- invalid: non-lowercase quoted identifiers
+CREATE TEXT SEARCH TEMPLATE tstemp_case ("Init" = init_function);
+ERROR: text search template parameter "Init" not recognized
SELECT nspname, tmplname
FROM pg_ts_template t, pg_namespace n
WHERE t.tmplnamespace = n.oid AND nspname like 'alt_nsp%'
(start = prsd_start, gettoken = prsd_nexttoken, end = prsd_end, lextypes = prsd_lextype);
ALTER TEXT SEARCH PARSER alt_ts_prs2 SET SCHEMA alt_nsp2; -- failed (name conflict)
ERROR: text search parser "alt_ts_prs2" already exists in schema "alt_nsp2"
+-- invalid: non-lowercase quoted identifiers
+CREATE TEXT SEARCH PARSER tspars_case ("Start" = start_function);
+ERROR: text search parser parameter "Start" not recognized
SELECT nspname, prsname
FROM pg_ts_parser t, pg_namespace n
WHERE t.prsnamespace = n.oid AND nspname like 'alt_nsp%'
ERROR: operator attribute "commutator" cannot be changed
ALTER OPERATOR === (boolean, boolean) SET (NEGATOR = !==);
ERROR: operator attribute "negator" cannot be changed
+-- invalid: non-lowercase quoted identifiers
+ALTER OPERATOR & (bit, bit) SET ("Restrict" = _int_contsel, "Join" = _int_contjoinsel);
+ERROR: operator attribute "Restrict" not recognized
--
-- Test permission check. Must be owner to ALTER OPERATOR.
--
ERROR: cannot drop collation mycoll2 because other objects depend on it
DETAIL: table collate_test23 column f1 depends on collation mycoll2
HINT: Use DROP ... CASCADE to drop the dependent objects too.
+-- invalid: non-lowercase quoted identifiers
+CREATE COLLATION case_coll ("Lc_Collate" = "POSIX", "Lc_Ctype" = "POSIX");
+ERROR: collation attribute "Lc_Collate" not recognized
+LINE 1: CREATE COLLATION case_coll ("Lc_Collate" = "POSIX", "Lc_Ctyp...
+ ^
-- 9.1 bug with useless COLLATE in an expression subject to length coercion
CREATE TEMP TABLE vctable (f1 varchar(25));
INSERT INTO vctable VALUES ('foo' COLLATE "C");
minvfunc = float8mi_int
);
ERROR: return type of inverse transition function float8mi_int is not double precision
+-- invalid: non-lowercase quoted identifiers
+CREATE AGGREGATE case_agg ( -- old syntax
+ "Sfunc1" = int4pl,
+ "Basetype" = int4,
+ "Stype1" = int4,
+ "Initcond1" = '0',
+ "Parallel" = safe
+);
+WARNING: aggregate attribute "Sfunc1" not recognized
+WARNING: aggregate attribute "Basetype" not recognized
+WARNING: aggregate attribute "Stype1" not recognized
+WARNING: aggregate attribute "Initcond1" not recognized
+WARNING: aggregate attribute "Parallel" not recognized
+ERROR: aggregate stype must be specified
+CREATE AGGREGATE case_agg(float8)
+(
+ "Stype" = internal,
+ "Sfunc" = ordered_set_transition,
+ "Finalfunc" = percentile_disc_final,
+ "Finalfunc_extra" = true,
+ "Finalfunc_modify" = read_write,
+ "Parallel" = safe
+);
+WARNING: aggregate attribute "Stype" not recognized
+WARNING: aggregate attribute "Sfunc" not recognized
+WARNING: aggregate attribute "Finalfunc" not recognized
+WARNING: aggregate attribute "Finalfunc_extra" not recognized
+WARNING: aggregate attribute "Finalfunc_modify" not recognized
+WARNING: aggregate attribute "Parallel" not recognized
+ERROR: aggregate stype must be specified
);
ERROR: permission denied for type type_op6
ROLLBACK;
+-- invalid: non-lowercase quoted identifiers
+CREATE OPERATOR ===
+(
+ "Leftarg" = box,
+ "Rightarg" = box,
+ "Procedure" = area_equal_procedure,
+ "Commutator" = ===,
+ "Negator" = !==,
+ "Restrict" = area_restriction_procedure,
+ "Join" = area_join_procedure,
+ "Hashes",
+ "Merges"
+);
+WARNING: operator attribute "Leftarg" not recognized
+WARNING: operator attribute "Rightarg" not recognized
+WARNING: operator attribute "Procedure" not recognized
+WARNING: operator attribute "Commutator" not recognized
+WARNING: operator attribute "Negator" not recognized
+WARNING: operator attribute "Restrict" not recognized
+WARNING: operator attribute "Join" not recognized
+WARNING: operator attribute "Hashes" not recognized
+WARNING: operator attribute "Merges" not recognized
+ERROR: operator procedure must be specified
t text
);
NOTICE: relation "test_tsvector" already exists, skipping
+-- invalid: non-lowercase quoted reloptions identifiers
+CREATE TABLE tas_case WITH ("Fillfactor" = 10) AS SELECT 1 a;
+ERROR: unrecognized parameter "Fillfactor"
+CREATE TABLE tas_case (a text) WITH ("Oids" = true);
+ERROR: unrecognized parameter "Oids"
CREATE UNLOGGED TABLE unlogged1 (a int primary key); -- OK
CREATE TEMPORARY TABLE unlogged2 (a int primary key); -- OK
SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged\d' ORDER BY relname;
zippo | 42
(1 row)
+-- invalid: non-lowercase quoted identifiers
+CREATE TYPE case_int42 (
+ "Internallength" = 4,
+ "Input" = int42_in,
+ "Output" = int42_out,
+ "Alignment" = int4,
+ "Default" = 42,
+ "Passedbyvalue"
+);
+WARNING: type attribute "Internallength" not recognized
+LINE 2: "Internallength" = 4,
+ ^
+WARNING: type attribute "Input" not recognized
+LINE 3: "Input" = int42_in,
+ ^
+WARNING: type attribute "Output" not recognized
+LINE 4: "Output" = int42_out,
+ ^
+WARNING: type attribute "Alignment" not recognized
+LINE 5: "Alignment" = int4,
+ ^
+WARNING: type attribute "Default" not recognized
+LINE 6: "Default" = 42,
+ ^
+WARNING: type attribute "Passedbyvalue" not recognized
+LINE 7: "Passedbyvalue"
+ ^
+ERROR: type input function must be specified
-- Test stand-alone composite type
CREATE TYPE default_test_row AS (f1 text_w_default, f2 int42);
CREATE FUNCTION get_default_test() RETURNS SETOF default_test_row AS '
'card':3,10 'invit':2,9 'like':6 'look':5 'order':1,8
(1 row)
+-- invalid: non-lowercase quoted identifiers
+CREATE TEXT SEARCH DICTIONARY tsdict_case
+(
+ Template = ispell,
+ "DictFile" = ispell_sample,
+ "AffFile" = ispell_sample
+);
+ERROR: unrecognized Ispell parameter: "DictFile"
RETURN NULL;
END$$;
-CREATE AGGREGATE balk(
- BASETYPE = int4,
+CREATE AGGREGATE balk(int4)
+(
SFUNC = balkifnull(int8, int4),
STYPE = int8,
- "PARALLEL" = SAFE,
- INITCOND = '0');
+ PARALLEL = SAFE,
+ INITCOND = '0'
+);
SELECT balk(hundred) FROM tenk1;
RETURN NULL;
END$$;
-CREATE AGGREGATE balk(
- BASETYPE = int4,
+CREATE AGGREGATE balk(int4)
+(
SFUNC = int4_sum(int8, int4),
STYPE = int8,
COMBINEFUNC = balkifnull(int8, int8),
- "PARALLEL" = SAFE,
+ PARALLEL = SAFE,
INITCOND = '0'
);
CREATE TEXT SEARCH TEMPLATE alt_ts_temp2 (lexize=dsimple_lexize);
ALTER TEXT SEARCH TEMPLATE alt_ts_temp2 SET SCHEMA alt_nsp2; -- failed (name conflict)
+-- invalid: non-lowercase quoted identifiers
+CREATE TEXT SEARCH TEMPLATE tstemp_case ("Init" = init_function);
+
SELECT nspname, tmplname
FROM pg_ts_template t, pg_namespace n
WHERE t.tmplnamespace = n.oid AND nspname like 'alt_nsp%'
(start = prsd_start, gettoken = prsd_nexttoken, end = prsd_end, lextypes = prsd_lextype);
ALTER TEXT SEARCH PARSER alt_ts_prs2 SET SCHEMA alt_nsp2; -- failed (name conflict)
+-- invalid: non-lowercase quoted identifiers
+CREATE TEXT SEARCH PARSER tspars_case ("Start" = start_function);
+
SELECT nspname, prsname
FROM pg_ts_parser t, pg_namespace n
WHERE t.prsnamespace = n.oid AND nspname like 'alt_nsp%'
ALTER OPERATOR === (boolean, boolean) SET (COMMUTATOR = !==);
ALTER OPERATOR === (boolean, boolean) SET (NEGATOR = !==);
+-- invalid: non-lowercase quoted identifiers
+ALTER OPERATOR & (bit, bit) SET ("Restrict" = _int_contsel, "Join" = _int_contjoinsel);
+
--
-- Test permission check. Must be owner to ALTER OPERATOR.
--
CREATE TABLE collate_test23 (f1 text collate mycoll2);
DROP COLLATION mycoll2; -- fail
+-- invalid: non-lowercase quoted identifiers
+CREATE COLLATION case_coll ("Lc_Collate" = "POSIX", "Lc_Ctype" = "POSIX");
-- 9.1 bug with useless COLLATE in an expression subject to length coercion
msfunc = float8pl,
minvfunc = float8mi_int
);
+
+-- invalid: non-lowercase quoted identifiers
+
+CREATE AGGREGATE case_agg ( -- old syntax
+ "Sfunc1" = int4pl,
+ "Basetype" = int4,
+ "Stype1" = int4,
+ "Initcond1" = '0',
+ "Parallel" = safe
+);
+
+CREATE AGGREGATE case_agg(float8)
+(
+ "Stype" = internal,
+ "Sfunc" = ordered_set_transition,
+ "Finalfunc" = percentile_disc_final,
+ "Finalfunc_extra" = true,
+ "Finalfunc_modify" = read_write,
+ "Parallel" = safe
+);
procedure = fn_op6
);
ROLLBACK;
+
+-- invalid: non-lowercase quoted identifiers
+CREATE OPERATOR ===
+(
+ "Leftarg" = box,
+ "Rightarg" = box,
+ "Procedure" = area_equal_procedure,
+ "Commutator" = ===,
+ "Negator" = !==,
+ "Restrict" = area_restriction_procedure,
+ "Join" = area_join_procedure,
+ "Hashes",
+ "Merges"
+);
t text
);
+-- invalid: non-lowercase quoted reloptions identifiers
+CREATE TABLE tas_case WITH ("Fillfactor" = 10) AS SELECT 1 a;
+CREATE TABLE tas_case (a text) WITH ("Oids" = true);
+
CREATE UNLOGGED TABLE unlogged1 (a int primary key); -- OK
CREATE TEMPORARY TABLE unlogged2 (a int primary key); -- OK
SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged\d' ORDER BY relname;
SELECT * FROM default_test;
+-- invalid: non-lowercase quoted identifiers
+CREATE TYPE case_int42 (
+ "Internallength" = 4,
+ "Input" = int42_in,
+ "Output" = int42_out,
+ "Alignment" = int4,
+ "Default" = 42,
+ "Passedbyvalue"
+);
+
-- Test stand-alone composite type
CREATE TYPE default_test_row AS (f1 text_w_default, f2 int42);
SELECT to_tsvector('thesaurus_tst', 'one postgres one two one two three one');
SELECT to_tsvector('thesaurus_tst', 'Supernovae star is very new star and usually called supernovae (abbreviation SN)');
SELECT to_tsvector('thesaurus_tst', 'Booking tickets is looking like a booking a tickets');
+
+-- invalid: non-lowercase quoted identifiers
+CREATE TEXT SEARCH DICTIONARY tsdict_case
+(
+ Template = ispell,
+ "DictFile" = ispell_sample,
+ "AffFile" = ispell_sample
+);