修改警告信息

This commit is contained in:
leiziwei
2024-03-14 11:16:12 +08:00
parent e57148b119
commit 4a7d12e5a4
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