Skip to content

Commit 36890cb

Browse files
authored
Merge pull request IvorySQL#796 from bigplaice/master
Fix issue 763
2 parents eebe0bd + 137f2d1 commit 36890cb

16 files changed

Lines changed: 26 additions & 26 deletions

File tree

src/backend/catalog/heap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ CheckAttributeNamesTypes(TupleDesc tupdesc, char relkind,
498498
{
499499
Form_pg_attribute attr = TupleDescAttr(tupdesc, i);
500500

501-
if (strcmp(NameStr(attr->attname), "rowid") == 0 && compatible_db != DB_ORACLE)
501+
if (strcmp(NameStr(attr->attname), "rowid") == 0 && compatible_db != ORA_PARSER)
502502
continue;
503503

504504
if (SystemAttributeByName(NameStr(attr->attname)) != NULL)

src/backend/catalog/namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4325,7 +4325,7 @@ preprocessNamespacePath(const char *searchPath, Oid roleid,
43254325
char *curname = (char *) lfirst(l);
43264326
Oid namespaceId;
43274327

4328-
if ((compatible_db == DB_ORACLE && enable_case_switch && identifier_case_switch != NORMAL) ? /* IvorySQL: case sensitive indentify */
4328+
if ((compatible_db == ORA_PARSER && enable_case_switch && identifier_case_switch != NORMAL) ? /* IvorySQL: case sensitive indentify */
43294329
pg_strcasecmp(curname, "$user") == 0 : strcmp(curname, "$user") == 0)
43304330
{
43314331
/* $user --- substitute namespace matching user name, if any */

src/backend/commands/explain.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4346,7 +4346,7 @@ show_modifytable_info(ModifyTableState *mtstate, List *ancestors,
43464346
update_path = mtstate->mt_merge_updated;
43474347
delete_path = mtstate->mt_merge_deleted;
43484348
skipped_path = total - insert_path - update_path - delete_path;
4349-
if (compatible_db != DB_ORACLE)
4349+
if (compatible_db != ORA_PARSER)
43504350
Assert(skipped_path >= 0);
43514351

43524352
if (es->format == EXPLAIN_FORMAT_TEXT)
@@ -4363,7 +4363,7 @@ show_modifytable_info(ModifyTableState *mtstate, List *ancestors,
43634363
appendStringInfo(es->str, " deleted=%.0f", delete_path);
43644364
if (skipped_path > 0)
43654365
{
4366-
if (compatible_db != DB_ORACLE)
4366+
if (compatible_db != ORA_PARSER)
43674367
appendStringInfo(es->str, " skipped=%.0f", skipped_path);
43684368
}
43694369
appendStringInfoChar(es->str, '\n');
@@ -4374,7 +4374,7 @@ show_modifytable_info(ModifyTableState *mtstate, List *ancestors,
43744374
ExplainPropertyFloat("Tuples Inserted", NULL, insert_path, 0, es);
43754375
ExplainPropertyFloat("Tuples Updated", NULL, update_path, 0, es);
43764376
ExplainPropertyFloat("Tuples Deleted", NULL, delete_path, 0, es);
4377-
if (compatible_db != DB_ORACLE)
4377+
if (compatible_db != ORA_PARSER)
43784378
ExplainPropertyFloat("Tuples Skipped", NULL, skipped_path, 0, es);
43794379
}
43804380
}

src/backend/commands/functioncmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2477,7 +2477,7 @@ ExecuteDoStmt(ParseState *pstate, DoStmt *stmt, bool atomic)
24772477
/* anonymous block's language default value is plsql
24782478
* in oracle compatibility mode
24792479
*/
2480-
if (DB_ORACLE == compatible_db)
2480+
if (ORA_PARSER == compatible_db)
24812481
language = "plisql";
24822482
else
24832483
language = "plpgsql";

src/backend/commands/sequence.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,7 +2452,7 @@ process_owned_by(Relation seqrel, List *owned_by, bool for_identity)
24522452
errmsg("sequence must be in same schema as table it is linked to")));
24532453

24542454
/* Now, fetch the attribute number from the system cache */
2455-
if (compatible_db == DB_ORACLE && strcmp(seqname, attrname) != 0)
2455+
if (compatible_db == ORA_PARSER && strcmp(seqname, attrname) != 0)
24562456
{
24572457
attnum = get_attnum(RelationGetRelid(tablerel), attrname);
24582458
if (attnum == InvalidAttrNumber)
@@ -2461,7 +2461,7 @@ process_owned_by(Relation seqrel, List *owned_by, bool for_identity)
24612461
errmsg("column \"%s\" of relation \"%s\" does not exist",
24622462
attrname, RelationGetRelationName(tablerel))));
24632463
}
2464-
else if (compatible_db == DB_PG)
2464+
else if (compatible_db == PG_PARSER)
24652465
{
24662466
attnum = get_attnum(RelationGetRelid(tablerel), attrname);
24672467
if (attnum == InvalidAttrNumber)

src/backend/executor/execExprInterp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4112,7 +4112,7 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
41124112

41134113
if (values != NIL)
41144114
{
4115-
if (ora_updatexml_hook && compatible_db == DB_ORACLE)
4115+
if (ora_updatexml_hook && compatible_db == ORA_PARSER)
41164116
*op->resvalue = PointerGetDatum((*ora_updatexml_hook)(values));
41174117
else
41184118
*op->resvalue = (Datum) 0;

src/backend/executor/nodeModifyTable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3587,7 +3587,7 @@ fireASTriggers(ModifyTableState *node)
35873587
node->mt_transition_capture);
35883588
break;
35893589
case CMD_MERGE:
3590-
if (compatible_db == DB_ORACLE)
3590+
if (compatible_db == ORA_PARSER)
35913591
{
35923592
if (node->mt_merge_subcommands & MERGE_UPDATE)
35933593
ExecASUpdateTriggers(node->ps.state, resultRelInfo,

src/backend/parser/analyze.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,7 +2462,7 @@ transformUpdateStmt(ParseState *pstate, UpdateStmt *stmt)
24622462
qry->returningList = transformReturningList(pstate, stmt->returningList,
24632463
EXPR_KIND_RETURNING);
24642464

2465-
if (DB_ORACLE == compatible_db)
2465+
if (ORA_PARSER == compatible_db)
24662466
{
24672467
ListCell *o_target;
24682468

@@ -2542,7 +2542,7 @@ transformUpdateTargetList(ParseState *pstate, List *origTlist)
25422542

25432543
attrno = attnameAttNum(pstate->p_target_relation,
25442544
origTarget->name, true);
2545-
if (attrno == InvalidAttrNumber && compatible_db == DB_ORACLE)
2545+
if (attrno == InvalidAttrNumber && compatible_db == ORA_PARSER)
25462546
{
25472547
if (origTarget->indirection)
25482548
{
@@ -2600,7 +2600,7 @@ transformUpdateTargetList(ParseState *pstate, List *origTlist)
26002600
parser_errposition(pstate, origTarget->location)));
26012601
}
26022602
}
2603-
if (attrno == InvalidAttrNumber && compatible_db == DB_PG)
2603+
if (attrno == InvalidAttrNumber && compatible_db == PG_PARSER)
26042604
{
26052605
ereport(ERROR,
26062606
(errcode(ERRCODE_UNDEFINED_COLUMN),

src/backend/parser/parse_clause.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3920,7 +3920,7 @@ interpretRowidOption(List *defList, bool allowRowid)
39203920
* ROWID option was not specified, so use default GUC value,
39213921
* but this GUC only valid in DB_ORACLE model
39223922
*/
3923-
if (compatible_db == DB_ORACLE)
3923+
if (compatible_db == ORA_PARSER)
39243924
return default_with_rowids;
39253925
else
39263926
return false;

src/backend/parser/parse_expr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ transformAExprOp(ParseState *pstate, A_Expr *a)
11071107
lexpr = transformExprRecurse(pstate, lexpr);
11081108
ltypeId = exprType(lexpr);
11091109

1110-
if (compatible_db == DB_ORACLE && ltypeId == ROWIDOID && nodeTag(rexpr) != T_TypeCast)
1110+
if (compatible_db == ORA_PARSER && ltypeId == ROWIDOID && nodeTag(rexpr) != T_TypeCast)
11111111
{
11121112
TypeCast *castnode = makeNode(TypeCast);
11131113
castnode->typeName = makeTypeNameFromNameList(list_make2(makeString("sys"), makeString("rowid")));

0 commit comments

Comments
 (0)