Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions contrib/babelfishpg_tsql/src/pltsql_coerce.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,8 @@ resolve_numeric_typmod_from_exp(Plan *plan, Node *expr, bool *found)
{
/* UDT handling in T_var */
Oid immediate_base_type = get_immediate_base_type_of_UDT_internal(var->vartype);
int32 fixlen_default_typmod;

if (OidIsValid(immediate_base_type))
{
int32 typmod = -1;
Expand All @@ -1455,17 +1457,10 @@ resolve_numeric_typmod_from_exp(Plan *plan, Node *expr, bool *found)
* Handle default typmod for supported fixed-length datatypes
* such as bigint, int, smallint, and tinyint.
* These typmods represent the maximum allowed digits for each type.
*
* Plan check ensures typmod consistency to preventing incorrect values,
* ensuring plan is not changed if typmod is calculated in execution stage.
*/
if (plan)
{
int32 fixlen_default_typmod;
fixlen_default_typmod = get_default_typmod_for_fixedsize_dataypes(var->vartype);
if (fixlen_default_typmod != -1)
return fixlen_default_typmod;
}
fixlen_default_typmod = get_default_typmod_for_fixedsize_dataypes(var->vartype);
if (fixlen_default_typmod != -1)
return fixlen_default_typmod;

if (found != NULL) *found = false;
}
Expand Down
2 changes: 1 addition & 1 deletion test/JDBC/expected/BABEL-1164.out
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SELECT * FROM t2;
GO
~~START~~
int#!#int#!#numeric#!#numeric
1#!#1#!#2#!#2.00000000
1#!#1#!#2#!#2
~~END~~


Expand Down
12 changes: 6 additions & 6 deletions test/JDBC/expected/BABEL-4264.out
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ go
text
Query Text: SELECT * from babel4264 where dollars = 10
Seq Scan on babel4264
Filter: ((dollars)::fixeddecimal = 10)
Filter: ((dollars)::fixeddecimal(19,4) = 10)
~~END~~

~~START~~
Expand All @@ -157,7 +157,7 @@ go
text
Query Text: SELECT * from babel4264 where dollars = 10.0
Seq Scan on babel4264
Filter: ((dollars)::fixeddecimal = 10.0)
Filter: ((dollars)::fixeddecimal(19,4) = 10.0)
~~END~~

~~START~~
Expand All @@ -172,7 +172,7 @@ go
text
Query Text: SELECT * from babel4264 where dollars = 2147483650
Seq Scan on babel4264
Filter: ((dollars)::fixeddecimal = '2147483650'::bigint)
Filter: ((dollars)::fixeddecimal(19,4) = '2147483650'::bigint)
~~END~~

~~START~~
Expand All @@ -187,7 +187,7 @@ go
text
Query Text: SELECT * from babel4264 where dollars = '10.12'
Seq Scan on babel4264
Filter: ((dollars)::fixeddecimal = '10.1200'::fixeddecimal)
Filter: ((dollars)::fixeddecimal(19,4) = '10.1200'::fixeddecimal)
~~END~~

~~START~~
Expand All @@ -202,7 +202,7 @@ go
text
Query Text: SELECT * from babel4264 where dollars = '10.123512341234'
Seq Scan on babel4264
Filter: ((dollars)::fixeddecimal = '10.1235'::fixeddecimal)
Filter: ((dollars)::fixeddecimal(19,4) = '10.1235'::fixeddecimal)
~~END~~

~~START~~
Expand All @@ -217,7 +217,7 @@ go
text
Query Text: SELECT * from babel4264 where dollars = cast('10' as varchar(30))
Seq Scan on babel4264
Filter: ((dollars)::fixeddecimal = '10.0000'::fixeddecimal)
Filter: ((dollars)::fixeddecimal(19,4) = '10.0000'::fixeddecimal)
~~END~~

~~START~~
Expand Down
17 changes: 8 additions & 9 deletions test/JDBC/expected/Numeric_Decimal_tests.out
Original file line number Diff line number Diff line change
Expand Up @@ -9795,7 +9795,7 @@ text
Query Text: SELECT * FROM numeric_index_test
WHERE num_col = CAST(999.99 AS DECIMAL(18,2))
Index Scan using idx_composite_num_catnumeric_in0a16adf6c28603b70af9d88eead29f13 on numeric_index_test (actual rows=1 loops=1)
Index Cond: (num_col = 999.99)
Index Cond: (num_col = 999.99::numeric(18,2))
~~END~~


Expand Down Expand Up @@ -9867,7 +9867,7 @@ text
Query Text: SELECT * FROM numeric_index_test
WHERE num_col BETWEEN 400.00 AND CAST(600.00 AS DECIMAL(18,2))
Index Scan using idx_composite_num_catnumeric_in0a16adf6c28603b70af9d88eead29f13 on numeric_index_test (actual rows=1 loops=1)
Index Cond: ((num_col >= 400.00) AND (num_col <= 600.00))
Index Cond: ((num_col >= 400.00) AND (num_col <= 600.00::numeric(18,2)))
~~END~~


Expand All @@ -9888,11 +9888,10 @@ text
Query Text: SELECT a.*, b.*
FROM numeric_index_test a
JOIN numeric_index_test b ON a.num_col = b.decimal_col
Merge Join (actual rows=3 loops=1)
Merge Cond: (a.num_col = (b.decimal_col)::numeric)
Nested Loop (actual rows=3 loops=1)
-> Index Scan using idx_composite_num_catnumeric_in0a16adf6c28603b70af9d88eead29f13 on numeric_index_test a (actual rows=3 loops=1)
-> Materialize (actual rows=3 loops=1)
-> Index Scan using idx_decimalnumeric_index_test5d8e61a04a9662670ec1a2266602e173 on numeric_index_test b (actual rows=3 loops=1)
-> Index Scan using idx_decimalnumeric_index_test5d8e61a04a9662670ec1a2266602e173 on numeric_index_test b (actual rows=1 loops=3)
Index Cond: ((decimal_col)::numeric(18,2) = a.num_col)
~~END~~


Expand Down Expand Up @@ -9975,7 +9974,7 @@ text
Query Text: SELECT * FROM numeric_index_test
WHERE CAST(num_col AS DECIMAL(18,2)) = decimal_col
Seq Scan on numeric_index_test (actual rows=3 loops=1)
Filter: ((num_col)::numeric = (decimal_col)::numeric)
Filter: (num_col = (decimal_col)::numeric(18,2))
~~END~~


Expand Down Expand Up @@ -10032,7 +10031,7 @@ WHERE num_col = 123.45
AND decimal_col = 123.45
Index Scan using idx_composite_num_catnumeric_in0a16adf6c28603b70af9d88eead29f13 on numeric_index_test (actual rows=1 loops=1)
Index Cond: (num_col = 123.45)
Filter: ((decimal_col)::numeric = 123.45)
Filter: ((decimal_col)::numeric(18,2) = 123.45)
~~END~~


Expand Down Expand Up @@ -10156,7 +10155,7 @@ text
Query Text: SELECT * FROM numeric_index_test
WHERE num_col * 2 = decimal_col
Seq Scan on numeric_index_test (actual rows=0 loops=1)
Filter: ((num_col * '2'::numeric(1,0)) = (decimal_col)::numeric)
Filter: ((num_col * '2'::numeric(1,0)) = (decimal_col)::numeric(18,2))
Rows Removed by Filter: 4
~~END~~

Expand Down
10 changes: 5 additions & 5 deletions test/JDBC/expected/PARTITION-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -2228,7 +2228,7 @@ GO
text
Query Text: SELECT * FROM partition_vu_prepare_decimal_table WHERE Id >= 0.0 AND Id < 100.0
Index Scan using cda2902d769fd61eb60b1a461650212f_partition_1_id_idx on cda2902d769fd61eb60b1a461650212f_partition_1 partition_vu_prepare_decimal_table
Index Cond: (((id)::numeric >= 0.0) AND ((id)::numeric < 100.0))
Index Cond: (((id)::numeric(10,5) >= 0.0) AND ((id)::numeric(10,5) < 100.0))
~~END~~

~~START~~
Expand Down Expand Up @@ -2259,9 +2259,9 @@ text
Query Text: SELECT * FROM partition_vu_prepare_money_table WHERE Id >= 2.56789 AND Id < 3.56789
Append
-> Index Scan using "640187c54e2c2984d190957d245a5fa5_partition_1_id_idx" on "640187c54e2c2984d190957d245a5fa5_partition_1" partition_vu_prepare_money_table_1
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(19,4) >= 2.56789) AND ((id)::fixeddecimal(19,4) < 3.56789))
-> Index Scan using "640187c54e2c2984d190957d245a5fa5_partition_0_id_idx" on "640187c54e2c2984d190957d245a5fa5_partition_0" partition_vu_prepare_money_table_2
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(19,4) >= 2.56789) AND ((id)::fixeddecimal(19,4) < 3.56789))
~~END~~

~~START~~
Expand All @@ -2277,9 +2277,9 @@ text
Query Text: SELECT * FROM partition_vu_prepare_smallmoney_table WHERE Id >= 2.56789 AND Id < 3.56789
Append
-> Index Scan using "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_1_id_idx" on "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_1" partition_vu_prepare_smallmoney_table_1
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(10,4) >= 2.56789) AND ((id)::fixeddecimal(10,4) < 3.56789))
-> Index Scan using "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_0_id_idx" on "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_0" partition_vu_prepare_smallmoney_table_2
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(10,4) >= 2.56789) AND ((id)::fixeddecimal(10,4) < 3.56789))
~~END~~

~~START~~
Expand Down
2 changes: 1 addition & 1 deletion test/JDBC/expected/babel_datatype.out
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ select CAST(2 AS money) / CAST(0.5 AS decimal(4,2));
GO
~~START~~
numeric
4.0000000
4.000000000
~~END~~


Expand Down
10 changes: 5 additions & 5 deletions test/JDBC/expected/db_collation/PARTITION-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -2228,7 +2228,7 @@ GO
text
Query Text: SELECT * FROM partition_vu_prepare_decimal_table WHERE Id >= 0.0 AND Id < 100.0
Index Scan using cda2902d769fd61eb60b1a461650212f_partition_1_id_idx on cda2902d769fd61eb60b1a461650212f_partition_1 partition_vu_prepare_decimal_table
Index Cond: (((id)::numeric >= 0.0) AND ((id)::numeric < 100.0))
Index Cond: (((id)::numeric(10,5) >= 0.0) AND ((id)::numeric(10,5) < 100.0))
~~END~~

~~START~~
Expand Down Expand Up @@ -2259,9 +2259,9 @@ text
Query Text: SELECT * FROM partition_vu_prepare_money_table WHERE Id >= 2.56789 AND Id < 3.56789
Append
-> Index Scan using "640187c54e2c2984d190957d245a5fa5_partition_1_id_idx" on "640187c54e2c2984d190957d245a5fa5_partition_1" partition_vu_prepare_money_table_1
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(19,4) >= 2.56789) AND ((id)::fixeddecimal(19,4) < 3.56789))
-> Index Scan using "640187c54e2c2984d190957d245a5fa5_partition_0_id_idx" on "640187c54e2c2984d190957d245a5fa5_partition_0" partition_vu_prepare_money_table_2
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(19,4) >= 2.56789) AND ((id)::fixeddecimal(19,4) < 3.56789))
~~END~~

~~START~~
Expand All @@ -2277,9 +2277,9 @@ text
Query Text: SELECT * FROM partition_vu_prepare_smallmoney_table WHERE Id >= 2.56789 AND Id < 3.56789
Append
-> Index Scan using "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_1_id_idx" on "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_1" partition_vu_prepare_smallmoney_table_1
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(10,4) >= 2.56789) AND ((id)::fixeddecimal(10,4) < 3.56789))
-> Index Scan using "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_0_id_idx" on "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_0" partition_vu_prepare_smallmoney_table_2
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(10,4) >= 2.56789) AND ((id)::fixeddecimal(10,4) < 3.56789))
~~END~~

~~START~~
Expand Down
24 changes: 12 additions & 12 deletions test/JDBC/expected/money_smallmoney-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ GO
text
Query Text: SELECT * FROM money_smallmoney_vu_test WHERE cost_sm BETWEEN 100 and 200
Index Scan using idx_cost_smallmoneymoney_smallm763569c9206bb1e36c4670199725a26c on money_smallmoney_vu_test
Index Cond: (((cost_sm)::fixeddecimal >= 100) AND ((cost_sm)::fixeddecimal <= 200))
Index Cond: (((cost_sm)::fixeddecimal(10,4) >= 100) AND ((cost_sm)::fixeddecimal(10,4) <= 200))
~~END~~

~~START~~
Expand Down Expand Up @@ -188,7 +188,7 @@ text
Query Text: SELECT COUNT(*) FROM money_smallmoney_vu_test WHERE cost_sm <= CAST(50 AS SMALLMONEY) + CAST(50 AS SMALLMONEY)
Aggregate
-> Index Only Scan using idx_cost_smallmoneymoney_smallm763569c9206bb1e36c4670199725a26c on money_smallmoney_vu_test
Index Cond: (cost_sm <= ((('50.0000'::fixeddecimal(10,4))::smallmoney(655368) + ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_sm <= ((('50.0000'::fixeddecimal(10,4))::smallmoney(655368) + ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -204,7 +204,7 @@ text
Query Text: SELECT COUNT(*) FROM money_smallmoney_vu_test WHERE cost_sm = CAST(2 AS INT) * CAST(50 AS SMALLMONEY)
Aggregate
-> Index Only Scan using idx_cost_smallmoneymoney_smallm763569c9206bb1e36c4670199725a26c on money_smallmoney_vu_test
Index Cond: (cost_sm = ((2 * ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_sm = ((2 * ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -220,7 +220,7 @@ text
Query Text: SELECT COUNT(*) FROM money_smallmoney_vu_test WHERE cost_sm > CAST(200 AS INT) / CAST(2 AS SMALLMONEY)
Aggregate
-> Index Only Scan using idx_cost_smallmoneymoney_smallm763569c9206bb1e36c4670199725a26c on money_smallmoney_vu_test
Index Cond: (cost_sm > ((200 / ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_sm > ((200 / ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -235,7 +235,7 @@ GO
text
Query Text: SELECT cost_sm FROM money_smallmoney_vu_test WHERE cost_sm <= CAST(200 AS BIGINT) * CAST(2 AS SMALLMONEY)
Index Only Scan using idx_cost_smallmoneymoney_smallm763569c9206bb1e36c4670199725a26c on money_smallmoney_vu_test
Index Cond: (cost_sm <= (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_sm <= (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -250,7 +250,7 @@ GO
text
Query Text: SELECT * FROM money_smallmoney_vu_test WHERE cost_sm < CAST(200 AS BIGINT) * CAST(2 AS SMALLMONEY)
Index Scan using idx_cost_smallmoneymoney_smallm763569c9206bb1e36c4670199725a26c on money_smallmoney_vu_test
Index Cond: ((cost_sm)::fixeddecimal < (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: ((cost_sm)::fixeddecimal(10,4) < (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -265,7 +265,7 @@ GO
text
Query Text: SELECT * FROM money_smallmoney_vu_test WHERE cost_m BETWEEN 100 and 200
Index Scan using idx_cost_moneymoney_smallmoney_561673fc5dd7f27d48118a464f7209db on money_smallmoney_vu_test
Index Cond: (((cost_m)::fixeddecimal >= 100) AND ((cost_m)::fixeddecimal <= 200))
Index Cond: (((cost_m)::fixeddecimal(19,4) >= 100) AND ((cost_m)::fixeddecimal(19,4) <= 200))
~~END~~

~~START~~
Expand Down Expand Up @@ -297,7 +297,7 @@ text
Query Text: SELECT COUNT(*) FROM money_smallmoney_vu_test WHERE cost_m >= CAST(50 AS SMALLMONEY) + CAST(50 AS SMALLMONEY)
Aggregate
-> Index Only Scan using idx_cost_moneymoney_smallmoney_561673fc5dd7f27d48118a464f7209db on money_smallmoney_vu_test
Index Cond: (cost_m >= ((('50.0000'::fixeddecimal(10,4))::smallmoney(655368) + ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_m >= ((('50.0000'::fixeddecimal(10,4))::smallmoney(655368) + ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -313,7 +313,7 @@ text
Query Text: SELECT COUNT(*) FROM money_smallmoney_vu_test WHERE cost_m = CAST(2 AS INT) * CAST(50 AS SMALLMONEY)
Aggregate
-> Index Only Scan using idx_cost_moneymoney_smallmoney_561673fc5dd7f27d48118a464f7209db on money_smallmoney_vu_test
Index Cond: (cost_m = ((2 * ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_m = ((2 * ('50.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -329,7 +329,7 @@ text
Query Text: SELECT COUNT(*) FROM money_smallmoney_vu_test WHERE cost_m < CAST(200 AS INT) / CAST(2 AS SMALLMONEY)
Aggregate
-> Index Only Scan using idx_cost_moneymoney_smallmoney_561673fc5dd7f27d48118a464f7209db on money_smallmoney_vu_test
Index Cond: (cost_m < ((200 / ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_m < ((200 / ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -344,7 +344,7 @@ GO
text
Query Text: SELECT cost_m FROM money_smallmoney_vu_test WHERE cost_m < CAST(200 AS BIGINT) * CAST(2 AS SMALLMONEY)
Index Only Scan using idx_cost_moneymoney_smallmoney_561673fc5dd7f27d48118a464f7209db on money_smallmoney_vu_test
Index Cond: (cost_m < (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: (cost_m < (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand All @@ -359,7 +359,7 @@ GO
text
Query Text: SELECT * FROM money_smallmoney_vu_test WHERE cost_m > CAST(200 AS BIGINT) * CAST(2 AS SMALLMONEY)
Index Scan using idx_cost_moneymoney_smallmoney_561673fc5dd7f27d48118a464f7209db on money_smallmoney_vu_test
Index Cond: ((cost_m)::fixeddecimal > (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal)
Index Cond: ((cost_m)::fixeddecimal(19,4) > (('200'::bigint * ('2.0000'::fixeddecimal(10,4))::smallmoney(655368)))::fixeddecimal(10,4))
~~END~~

~~START~~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2228,7 +2228,7 @@ GO
text
Query Text: SELECT * FROM partition_vu_prepare_decimal_table WHERE Id >= 0.0 AND Id < 100.0
Index Scan using cda2902d769fd61eb60b1a461650212f_partition_1_id_idx on cda2902d769fd61eb60b1a461650212f_partition_1 partition_vu_prepare_decimal_table
Index Cond: (((id)::numeric >= 0.0) AND ((id)::numeric < 100.0))
Index Cond: (((id)::numeric(10,5) >= 0.0) AND ((id)::numeric(10,5) < 100.0))
~~END~~

~~START~~
Expand Down Expand Up @@ -2259,9 +2259,9 @@ text
Query Text: SELECT * FROM partition_vu_prepare_money_table WHERE Id >= 2.56789 AND Id < 3.56789
Append
-> Index Scan using "640187c54e2c2984d190957d245a5fa5_partition_1_id_idx" on "640187c54e2c2984d190957d245a5fa5_partition_1" partition_vu_prepare_money_table_1
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(19,4) >= 2.56789) AND ((id)::fixeddecimal(19,4) < 3.56789))
-> Index Scan using "640187c54e2c2984d190957d245a5fa5_partition_0_id_idx" on "640187c54e2c2984d190957d245a5fa5_partition_0" partition_vu_prepare_money_table_2
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(19,4) >= 2.56789) AND ((id)::fixeddecimal(19,4) < 3.56789))
~~END~~

~~START~~
Expand All @@ -2277,9 +2277,9 @@ text
Query Text: SELECT * FROM partition_vu_prepare_smallmoney_table WHERE Id >= 2.56789 AND Id < 3.56789
Append
-> Index Scan using "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_1_id_idx" on "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_1" partition_vu_prepare_smallmoney_table_1
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(10,4) >= 2.56789) AND ((id)::fixeddecimal(10,4) < 3.56789))
-> Index Scan using "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_0_id_idx" on "8acfdf2e7ec8a3fb29dd9f735c4d58b5_partition_0" partition_vu_prepare_smallmoney_table_2
Index Cond: (((id)::fixeddecimal >= 2.56789) AND ((id)::fixeddecimal < 3.56789))
Index Cond: (((id)::fixeddecimal(10,4) >= 2.56789) AND ((id)::fixeddecimal(10,4) < 3.56789))
~~END~~

~~START~~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ select CAST(2 AS money) / CAST(0.5 AS decimal(4,2));
GO
~~START~~
numeric
4.0000000
4.000000000
~~END~~


Expand Down
Loading
Loading