!4971 【测试类型:功能测试】【测试版本:6.0.0】【标识符双引号内大小写不敏感】 建议set参数时,增加说明,PL中该功能不生效

Merge pull request !4971 from 雷紫薇/plwarning
This commit is contained in:
opengauss_bot
2024-03-20 08:48:13 +00:00
committed by Gitee
2 changed files with 6 additions and 9 deletions

View File

@ -3781,9 +3781,8 @@ static void assign_convert_string_to_digit(bool newval, void* extra)
static bool check_enable_ignore_case_in_dquotes(bool* newval, void** extra, GucSource source) static bool check_enable_ignore_case_in_dquotes(bool* newval, void** extra, GucSource source)
{ {
if (*newval && (currentGucContext == PGC_SUSET || currentGucContext == PGC_USERSET)) { if (*newval && (currentGucContext == PGC_SUSET || currentGucContext == PGC_USERSET)) {
ereport(WARNING, (errmsg("if tables with the same name but different case already\n" ereport(WARNING, (errmsg("Please avoid turn on this param when already created\n"
"exists in the database, this will result in only being able to\n" "uppercase named objects or using double quotes in PL.")));
"manipulate tables with table names that are entirely lowercase.")));
} }
return true; return true;
} }

View File

@ -172,9 +172,8 @@ CREATE SEQUENCE s1 START 101 CACHE 20;
CREATE SEQUENCE "S1" START 801 CACHE 90; CREATE SEQUENCE "S1" START 801 CACHE 90;
drop sequence "S1"; drop sequence "S1";
set enable_ignore_case_in_dquotes=on; set enable_ignore_case_in_dquotes=on;
WARNING: if tables with the same name but different case already WARNING: Please avoid turn on this param when already created
exists in the database, this will result in only being able to uppercase named objects or using double quotes in PL.
manipulate tables with table names that are entirely lowercase.
CREATE SEQUENCE "SEQ11" START 101 CACHE 20; CREATE SEQUENCE "SEQ11" START 101 CACHE 20;
SELECT nextval('"SEQ11"'); SELECT nextval('"SEQ11"');
nextval nextval
@ -275,9 +274,8 @@ LINE 1: select regprocedure('"BB"(integer, "Comp")');
CONTEXT: referenced column: regprocedure CONTEXT: referenced column: regprocedure
-- test enable_ignore_case_in_dquotes=on -- test enable_ignore_case_in_dquotes=on
set enable_ignore_case_in_dquotes=on; set enable_ignore_case_in_dquotes=on;
WARNING: if tables with the same name but different case already WARNING: Please avoid turn on this param when already created
exists in the database, this will result in only being able to uppercase named objects or using double quotes in PL.
manipulate tables with table names that are entirely lowercase.
drop function "BB"; drop function "BB";
drop TYPE "cOMP"; drop TYPE "cOMP";
create table test1 ("A" int, 'a' int);-- error create table test1 ("A" int, 'a' int);-- error