@@ -2743,7 +2743,7 @@ public static function provideCases(): iterable
27432743 'pdoPgsqlResult ' => 0.125 ,
27442744 'pgsqlResult ' => 0.125 ,
27452745 'mssqlResult ' => 0.125 ,
2746- 'stringify ' => self ::STRINGIFY_DEFAULT ,
2746+ 'stringify ' => self ::STRINGIFY_PG_FLOAT ,
27472747 ];
27482748
27492749 yield 'MAX(t.col_decimal) ' => [
@@ -4170,6 +4170,38 @@ public static function provideCases(): iterable
41704170 'stringify ' => self ::STRINGIFY_DEFAULT ,
41714171 ];
41724172
4173+ yield 'COALESCE(0, 0) ' => [
4174+ 'data ' => self ::dataDefault (),
4175+ 'select ' => 'SELECT COALESCE(0, 0) FROM %s t ' ,
4176+ 'mysql ' => self ::int (),
4177+ 'sqlite ' => self ::int (),
4178+ 'pdo_pgsql ' => self ::int (),
4179+ 'pgsql ' => self ::int (),
4180+ 'mssql ' => self ::mixed (),
4181+ 'mysqlResult ' => 0 ,
4182+ 'sqliteResult ' => 0 ,
4183+ 'pdoPgsqlResult ' => 0 ,
4184+ 'pgsqlResult ' => 0 ,
4185+ 'mssqlResult ' => 0 ,
4186+ 'stringify ' => self ::STRINGIFY_DEFAULT ,
4187+ ];
4188+
4189+ yield 'COALESCE(1.0, 1.0) ' => [
4190+ 'data ' => self ::dataDefault (),
4191+ 'select ' => 'SELECT COALESCE(1.0, 1.0) FROM %s t ' ,
4192+ 'mysql ' => self ::numericString (),
4193+ 'sqlite ' => self ::float (),
4194+ 'pdo_pgsql ' => self ::numericString (),
4195+ 'pgsql ' => self ::numericString (),
4196+ 'mssql ' => self ::mixed (),
4197+ 'mysqlResult ' => '1.0 ' ,
4198+ 'sqliteResult ' => 1.0 ,
4199+ 'pdoPgsqlResult ' => '1.0 ' ,
4200+ 'pgsqlResult ' => '1.0 ' ,
4201+ 'mssqlResult ' => '1.0 ' ,
4202+ 'stringify ' => self ::STRINGIFY_DEFAULT ,
4203+ ];
4204+
41734205 yield 'COALESCE(1e0, 1.0) ' => [
41744206 'data ' => self ::dataDefault (),
41754207 'select ' => 'SELECT COALESCE(1e0, 1.0) FROM %s t ' ,
@@ -4255,15 +4287,17 @@ public static function provideCases(): iterable
42554287 'select ' => 'SELECT COALESCE(t.col_float_nullable, 0) FROM %s t ' ,
42564288 'mysql ' => self ::float (),
42574289 'sqlite ' => TypeCombinator::union (self ::float (), self ::int ()),
4258- 'pdo_pgsql ' => TypeCombinator::union (self ::float (), self ::int ()),
4290+ 'pdo_pgsql ' => PHP_VERSION_ID < 80400
4291+ ? TypeCombinator::union (self ::numericString (), self ::int ())
4292+ : TypeCombinator::union (self ::float (), self ::int ()),
42594293 'pgsql ' => TypeCombinator::union (self ::float (), self ::int ()),
42604294 'mssql ' => self ::mixed (),
42614295 'mysqlResult ' => 0.0 ,
42624296 'sqliteResult ' => 0 ,
4263- 'pdoPgsqlResult ' => 0.0 ,
4297+ 'pdoPgsqlResult ' => PHP_VERSION_ID < 80400 ? ' 0 ' : 0.0 ,
42644298 'pgsqlResult ' => 0.0 ,
42654299 'mssqlResult ' => 0.0 ,
4266- 'stringify ' => self ::STRINGIFY_PG_FLOAT ,
4300+ 'stringify ' => self ::STRINGIFY_DEFAULT ,
42674301 ];
42684302
42694303 yield 'COALESCE(t.col_float_nullable, 0.0) ' => [
@@ -4303,63 +4337,71 @@ public static function provideCases(): iterable
43034337 'select ' => 'SELECT COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, 0) FROM %s t ' ,
43044338 'mysql ' => self ::float (),
43054339 'sqlite ' => TypeCombinator::union (self ::float (), self ::int ()),
4306- 'pdo_pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
4340+ 'pdo_pgsql ' => PHP_VERSION_ID < 80400
4341+ ? TypeCombinator::union (self ::numericString (), self ::int ())
4342+ : TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43074343 'pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43084344 'mssql ' => self ::mixed (),
43094345 'mysqlResult ' => 0.0 ,
43104346 'sqliteResult ' => 0 ,
4311- 'pdoPgsqlResult ' => 0.0 ,
4347+ 'pdoPgsqlResult ' => PHP_VERSION_ID < 80400 ? ' 0 ' : 0.0 ,
43124348 'pgsqlResult ' => 0.0 ,
43134349 'mssqlResult ' => 0.0 ,
4314- 'stringify ' => self ::STRINGIFY_PG_FLOAT ,
4350+ 'stringify ' => self ::STRINGIFY_DEFAULT ,
43154351 ];
43164352
43174353 yield 'COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, 0.0) ' => [
43184354 'data ' => self ::dataDefault (),
43194355 'select ' => 'SELECT COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, 0.0) FROM %s t ' ,
43204356 'mysql ' => self ::float (),
43214357 'sqlite ' => TypeCombinator::union (self ::float (), self ::int ()),
4322- 'pdo_pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
4358+ 'pdo_pgsql ' => PHP_VERSION_ID < 80400
4359+ ? TypeCombinator::union (self ::numericString (), self ::int ())
4360+ : TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43234361 'pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43244362 'mssql ' => self ::mixed (),
43254363 'mysqlResult ' => 0.0 ,
43264364 'sqliteResult ' => 0.0 ,
4327- 'pdoPgsqlResult ' => 0.0 ,
4365+ 'pdoPgsqlResult ' => PHP_VERSION_ID < 80400 ? ' 0 ' : 0.0 ,
43284366 'pgsqlResult ' => 0.0 ,
43294367 'mssqlResult ' => 0.0 ,
4330- 'stringify ' => self ::STRINGIFY_PG_FLOAT ,
4368+ 'stringify ' => self ::STRINGIFY_DEFAULT ,
43314369 ];
43324370
43334371 yield 'COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, 0e0) ' => [
43344372 'data ' => self ::dataDefault (),
43354373 'select ' => 'SELECT COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, 0e0) FROM %s t ' ,
43364374 'mysql ' => self ::float (),
43374375 'sqlite ' => TypeCombinator::union (self ::float (), self ::int ()),
4338- 'pdo_pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
4376+ 'pdo_pgsql ' => PHP_VERSION_ID < 80400
4377+ ? TypeCombinator::union (self ::numericString (), self ::int ())
4378+ : TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43394379 'pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43404380 'mssql ' => self ::mixed (),
43414381 'mysqlResult ' => 0.0 ,
43424382 'sqliteResult ' => 0.0 ,
4343- 'pdoPgsqlResult ' => 0.0 ,
4383+ 'pdoPgsqlResult ' => PHP_VERSION_ID < 80400 ? ' 0 ' : 0.0 ,
43444384 'pgsqlResult ' => 0.0 ,
43454385 'mssqlResult ' => 0.0 ,
4346- 'stringify ' => self ::STRINGIFY_PG_FLOAT ,
4386+ 'stringify ' => self ::STRINGIFY_DEFAULT ,
43474387 ];
43484388
43494389 yield "COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, '0') " => [
43504390 'data ' => self ::dataDefault (),
43514391 'select ' => 'SELECT COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, \'0 \') FROM %s t ' ,
43524392 'mysql ' => self ::numericString (),
43534393 'sqlite ' => TypeCombinator::union (self ::float (), self ::int (), self ::numericString ()),
4354- 'pdo_pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
4394+ 'pdo_pgsql ' => PHP_VERSION_ID < 80400
4395+ ? TypeCombinator::union (self ::numericString (), self ::int ())
4396+ : TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43554397 'pgsql ' => TypeCombinator::union (self ::numericString (), self ::int (), self ::float ()),
43564398 'mssql ' => self ::mixed (),
43574399 'mysqlResult ' => '0 ' ,
43584400 'sqliteResult ' => '0 ' ,
4359- 'pdoPgsqlResult ' => 0.0 ,
4401+ 'pdoPgsqlResult ' => PHP_VERSION_ID < 80400 ? ' 0 ' : 0.0 ,
43604402 'pgsqlResult ' => 0.0 ,
43614403 'mssqlResult ' => 0.0 ,
4362- 'stringify ' => self ::STRINGIFY_PG_FLOAT ,
4404+ 'stringify ' => self ::STRINGIFY_DEFAULT ,
43634405 ];
43644406
43654407 yield 'COALESCE(t.col_int_nullable, t.col_decimal_nullable, t.col_float_nullable, t.col_string) ' => [
0 commit comments