Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
jongmin-won committed Dec 20, 2024
1 parent 55a8430 commit a1c8fcc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/parser/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ change_trigger_action_query (PARSER_CONTEXT * parser, PT_NODE * statement, char

save_custom = parser->custom_print;

parser->custom_print |= PT_SUPPRESS_RESOLVED;
//parser->custom_print |= PT_SUPPRESS_RESOLVED;
parser->flag.is_parsing_trigger = 1;

new_trigger_stmt_str = parser_print_tree_with_quotes (parser, statement);
Expand Down
48 changes: 31 additions & 17 deletions src/parser/parse_tree_cl.c
Original file line number Diff line number Diff line change
Expand Up @@ -8609,20 +8609,20 @@ pt_print_datatype (PARSER_CONTEXT * parser, PT_NODE * p)
if (parser->flag.is_parsing_unload_schema)
{
q = pt_append_nulstring (parser, q, "national character");
break;
}
break;
case PT_TYPE_VARNCHAR:
if (parser->flag.is_parsing_unload_schema)
{
q = pt_append_nulstring (parser, q, "national character varying");
break;
}
break;
case PT_TYPE_CHAR:
if (parser->flag.is_parsing_unload_schema)
{
q = pt_append_nulstring (parser, q, "character");
break;
}
break;
case PT_TYPE_VARCHAR:
if (!parser->flag.is_parsing_unload_schema)
{
Expand All @@ -8632,8 +8632,8 @@ pt_print_datatype (PARSER_CONTEXT * parser, PT_NODE * p)
else
{
q = pt_append_nulstring (parser, q, "character varying");
break;
}
break;
case PT_TYPE_BIT:
case PT_TYPE_VARBIT:
case PT_TYPE_FLOAT:
Expand Down Expand Up @@ -13026,8 +13026,20 @@ pt_print_insert (PARSER_CONTEXT * parser, PT_NODE * p)
parser->custom_print & ~PT_PRINT_ALIAS;
}

r1 = pt_print_bytes (parser, p->info.insert.spec);
r2 = pt_print_bytes_l (parser, p->info.insert.attr_list);
if (parser->flag.is_parsing_trigger == 1)
{
parser->custom_print |= PT_SUPPRESS_RESOLVED;
r1 = pt_print_bytes (parser, p->info.insert.spec);
r2 = pt_print_bytes_l (parser, p->info.insert.attr_list);
parser->custom_print & ~PT_SUPPRESS_RESOLVED;
}
else
{
r1 = pt_print_bytes (parser, p->info.insert.spec);
r2 = pt_print_bytes_l (parser, p->info.insert.attr_list);
}
//r1 = pt_print_bytes (parser, p->info.insert.spec);
//r2 = pt_print_bytes_l (parser, p->info.insert.attr_list);

parser->custom_print = save_custom;

Expand Down Expand Up @@ -13576,19 +13588,21 @@ pt_print_name (PARSER_CONTEXT * parser, PT_NODE * p)
PARSER_VARCHAR *q = NULL, *r1;
unsigned int save_custom = parser->custom_print;

char *dot = NULL;
//const char *dot = NULL;

parser->custom_print = parser->custom_print | p->info.name.custom_print;

if (parser->flag.is_parsing_trigger == 1 && p->info.name.resolved != NULL)
{
if (strcasecmp (p->info.name.resolved, "obj") == 0 || strcasecmp (p->info.name.resolved, "new") == 0
|| strcasecmp (p->info.name.resolved, "old") == 0)
{
parser->custom_print &= ~PT_SUPPRESS_RESOLVED;
}
}

/*
if (parser->flag.is_parsing_trigger == 1 && p->info.name.resolved != NULL)
{
//if (strcasecmp (p->info.name.resolved, "obj") == 0 || strcasecmp (p->info.name.resolved, "new") == 0
//|| strcasecmp (p->info.name.resolved, "old") == 0)
dot = strchr (p->info.name.resolved, '.');
if (!dot)
{
parser->custom_print &= ~PT_SUPPRESS_RESOLVED;
}
}
*/
if (!(parser->custom_print & PT_SUPPRESS_META_ATTR_CLASS) && (p->info.name.meta_class == PT_META_CLASS))
{
q = pt_append_nulstring (parser, q, "class ");
Expand Down

0 comments on commit a1c8fcc

Please sign in to comment.