更改浮点数特殊值显示控制GUC名称
This commit is contained in:
@ -940,13 +940,13 @@ BEGIN
|
||||
v_handle := GMS_COMPRESS.LZ_UNCOMPRESS_OPEN(content);
|
||||
v_bool := GMS_COMPRESS.ISOPEN(v_handle);
|
||||
RAISE NOTICE 'v_bool=%', v_bool;
|
||||
GMS_COMPRESS.LZ_UNCOMPRESS_CLOSE(v_handle,content);
|
||||
GMS_COMPRESS.LZ_UNCOMPRESS_CLOSE(v_handle);
|
||||
v_bool := GMS_COMPRESS.ISOPEN(v_handle);
|
||||
RAISE NOTICE 'v_bool=%', v_bool;
|
||||
END;
|
||||
/
|
||||
ERROR: when invoking function gms_compress.lz_uncompress_close, expected ")", maybe input something superfluous.
|
||||
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 10
|
||||
NOTICE: v_bool=t
|
||||
NOTICE: v_bool=f
|
||||
-- abnormal scenario
|
||||
DECLARE
|
||||
v_bool boolean;
|
||||
|
||||
@ -685,7 +685,7 @@ BEGIN
|
||||
v_handle := GMS_COMPRESS.LZ_UNCOMPRESS_OPEN(content);
|
||||
v_bool := GMS_COMPRESS.ISOPEN(v_handle);
|
||||
RAISE NOTICE 'v_bool=%', v_bool;
|
||||
GMS_COMPRESS.LZ_UNCOMPRESS_CLOSE(v_handle,content);
|
||||
GMS_COMPRESS.LZ_UNCOMPRESS_CLOSE(v_handle);
|
||||
v_bool := GMS_COMPRESS.ISOPEN(v_handle);
|
||||
RAISE NOTICE 'v_bool=%', v_bool;
|
||||
END;
|
||||
|
||||
@ -365,7 +365,7 @@ wdr_snapshot_retention_days|int|1,8|NULL|NULL|
|
||||
wdr_snapshot_query_timeout|int|100,2147483647|s|NULL|
|
||||
enable_wdr_snapshot|bool|0,0|NULL|NULL|
|
||||
enable_set_variable_b_format|bool|0,0|NULL|NULL|
|
||||
enable_binary_special_o_format|bool|0,0|NULL|NULL|
|
||||
enable_binary_special_a_format|bool|0,0|NULL|NULL|
|
||||
enable_asp|bool|0,0|NULL|NULL|
|
||||
enable_startwith_debug|bool|0,0|NULL|NULL|
|
||||
enable_stmt_track|bool|0,0|NULL|NULL|
|
||||
|
||||
@ -397,7 +397,7 @@ Datum float4out(PG_FUNCTION_ARGS)
|
||||
errno_t rc = EOK;
|
||||
|
||||
if (isnan(num)) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_o_format) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_a_format) {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "Nan");
|
||||
} else {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "NaN");
|
||||
@ -408,7 +408,7 @@ Datum float4out(PG_FUNCTION_ARGS)
|
||||
|
||||
switch (is_infinite(num)) {
|
||||
case 1:
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_o_format) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_a_format) {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "Inf");
|
||||
} else {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "Infinity");
|
||||
@ -416,7 +416,7 @@ Datum float4out(PG_FUNCTION_ARGS)
|
||||
securec_check_ss(rc, "\0", "\0");
|
||||
break;
|
||||
case -1:
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_o_format) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_a_format) {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "-Inf");
|
||||
} else {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "-Infinity");
|
||||
@ -639,7 +639,7 @@ Datum float8out(PG_FUNCTION_ARGS)
|
||||
errno_t rc = EOK;
|
||||
|
||||
if (isnan(num)) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_o_format && !is_req_from_jdbc()) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_a_format && !is_req_from_jdbc()) {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "Nan");
|
||||
} else {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "NaN");
|
||||
@ -649,7 +649,7 @@ Datum float8out(PG_FUNCTION_ARGS)
|
||||
}
|
||||
switch (is_infinite(num)) {
|
||||
case 1:
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_o_format && !is_req_from_jdbc()) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_a_format && !is_req_from_jdbc()) {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "Inf");
|
||||
} else {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "Infinity");
|
||||
@ -657,7 +657,7 @@ Datum float8out(PG_FUNCTION_ARGS)
|
||||
securec_check(rc, "\0", "\0");
|
||||
break;
|
||||
case -1:
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_o_format && !is_req_from_jdbc()) {
|
||||
if (u_sess->attr.attr_sql.enable_binary_special_a_format && !is_req_from_jdbc()) {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "-Inf");
|
||||
} else {
|
||||
rc = strcpy_s(ascii, MAXDOUBLEWIDTH + 1, "-Infinity");
|
||||
|
||||
@ -665,13 +665,13 @@ static void InitSqlConfigureNamesBool()
|
||||
NULL,
|
||||
NULL,
|
||||
NULL},
|
||||
{{"enable_binary_special_o_format",
|
||||
{{"enable_binary_special_a_format",
|
||||
PGC_USERSET,
|
||||
NODE_ALL,
|
||||
QUERY_TUNING_COST,
|
||||
gettext_noop("Allows the user to specify the value of a double-precision floating-point parameter."),
|
||||
NULL},
|
||||
&u_sess->attr.attr_sql.enable_binary_special_o_format,
|
||||
&u_sess->attr.attr_sql.enable_binary_special_a_format,
|
||||
false,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@ -130,7 +130,7 @@ typedef struct knl_session_attr_sql {
|
||||
bool enable_light_proxy;
|
||||
bool enable_pbe_optimization;
|
||||
bool enable_cluster_resize;
|
||||
bool enable_binary_special_o_format;
|
||||
bool enable_binary_special_a_format;
|
||||
bool lo_compat_privileges;
|
||||
bool quote_all_identifiers;
|
||||
bool enforce_a_behavior;
|
||||
|
||||
@ -451,7 +451,7 @@ SELECT CONCAT('The value is ', TO_CHAR(-BINARY_DOUBLE_NAN)) AS result;
|
||||
The value is NaN
|
||||
(1 row)
|
||||
|
||||
set enable_binary_special_o_format to on;
|
||||
set enable_binary_special_a_format to on;
|
||||
SELECT CONCAT('The value is ', TO_CHAR(BINARY_DOUBLE_INFINITY)) AS result;
|
||||
result
|
||||
------------------
|
||||
|
||||
@ -161,7 +161,7 @@ set float_suffix_acceptance to on;
|
||||
SELECT CONCAT('The value is ', TO_CHAR(BINARY_DOUBLE_INFINITY)) AS result;
|
||||
SELECT CONCAT('The value is ', TO_CHAR(-BINARY_DOUBLE_INFINITY)) AS result;
|
||||
SELECT CONCAT('The value is ', TO_CHAR(-BINARY_DOUBLE_NAN)) AS result;
|
||||
set enable_binary_special_o_format to on;
|
||||
set enable_binary_special_a_format to on;
|
||||
SELECT CONCAT('The value is ', TO_CHAR(BINARY_DOUBLE_INFINITY)) AS result;
|
||||
SELECT CONCAT('The value is ', TO_CHAR(-BINARY_DOUBLE_INFINITY)) AS result;
|
||||
SELECT CONCAT('The value is ', TO_CHAR(-BINARY_DOUBLE_NAN)) AS result;
|
||||
|
||||
Reference in New Issue
Block a user