public inbox for [email protected]help / color / mirror / Atom feed
pgsql: test_custom_types: Test module with fancy custom data types 6+ messages / 1 participants [nested] [flat]
* pgsql: test_custom_types: Test module with fancy custom data types @ 2026-03-02 02:10 Michael Paquier <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-03-02 02:10 UTC (permalink / raw) To: [email protected] test_custom_types: Test module with fancy custom data types This commit adds a new test module called "test_custom_types", that can be used to stress code paths related to custom data type implementations. Currently, this is used as a test suite to validate the set of fixes done in 3b7a6fa15720, that requires some typanalyze callbacks that can force very specific backend behaviors, as of: - typanalyze callback that returns "false" as status, to mark a failure in computing statistics. - typanalyze callback that returns "true" but let's the backend know that no interesting stats could be computed, with stats_valid set to "false". This could be extended more in the future if more problems are found. For simplicity, the module uses a fake int4 data type, that requires a btree operator class to be usable with extended statistics. The type is created by the extension, and its properties are altered in the test. Like 3b7a6fa15720, this module is backpatched down to v14, for coverage purposes. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/2176520089e8c78a2eadb693670f65eaabf8ede2 Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/meson.build | 1 + src/test/modules/test_custom_types/.gitignore | 4 + src/test/modules/test_custom_types/Makefile | 20 +++ src/test/modules/test_custom_types/README | 9 + .../expected/test_custom_types.out | 180 ++++++++++++++++++++ src/test/modules/test_custom_types/meson.build | 33 ++++ .../test_custom_types/sql/test_custom_types.sql | 107 ++++++++++++ .../test_custom_types/test_custom_types--1.0.sql | 164 +++++++++++++++++++ .../modules/test_custom_types/test_custom_types.c | 182 +++++++++++++++++++++ .../test_custom_types/test_custom_types.control | 5 + 11 files changed, 706 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: test_custom_types: Test module with fancy custom data types @ 2026-03-02 02:10 Michael Paquier <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-03-02 02:10 UTC (permalink / raw) To: [email protected] test_custom_types: Test module with fancy custom data types This commit adds a new test module called "test_custom_types", that can be used to stress code paths related to custom data type implementations. Currently, this is used as a test suite to validate the set of fixes done in 3b7a6fa15720, that requires some typanalyze callbacks that can force very specific backend behaviors, as of: - typanalyze callback that returns "false" as status, to mark a failure in computing statistics. - typanalyze callback that returns "true" but let's the backend know that no interesting stats could be computed, with stats_valid set to "false". This could be extended more in the future if more problems are found. For simplicity, the module uses a fake int4 data type, that requires a btree operator class to be usable with extended statistics. The type is created by the extension, and its properties are altered in the test. Like 3b7a6fa15720, this module is backpatched down to v14, for coverage purposes. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/017e4e395d0dd2593e3bcef85c6c80a868877351 Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/meson.build | 1 + src/test/modules/test_custom_types/.gitignore | 4 + src/test/modules/test_custom_types/Makefile | 20 +++ src/test/modules/test_custom_types/README | 9 + .../expected/test_custom_types.out | 174 ++++++++++++++++++++ src/test/modules/test_custom_types/meson.build | 33 ++++ .../test_custom_types/sql/test_custom_types.sql | 104 ++++++++++++ .../test_custom_types/test_custom_types--1.0.sql | 164 +++++++++++++++++++ .../modules/test_custom_types/test_custom_types.c | 182 +++++++++++++++++++++ .../test_custom_types/test_custom_types.control | 5 + 11 files changed, 697 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: test_custom_types: Test module with fancy custom data types @ 2026-03-02 02:10 Michael Paquier <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-03-02 02:10 UTC (permalink / raw) To: [email protected] test_custom_types: Test module with fancy custom data types This commit adds a new test module called "test_custom_types", that can be used to stress code paths related to custom data type implementations. Currently, this is used as a test suite to validate the set of fixes done in 3b7a6fa15720, that requires some typanalyze callbacks that can force very specific backend behaviors, as of: - typanalyze callback that returns "false" as status, to mark a failure in computing statistics. - typanalyze callback that returns "true" but let's the backend know that no interesting stats could be computed, with stats_valid set to "false". This could be extended more in the future if more problems are found. For simplicity, the module uses a fake int4 data type, that requires a btree operator class to be usable with extended statistics. The type is created by the extension, and its properties are altered in the test. Like 3b7a6fa15720, this module is backpatched down to v14, for coverage purposes. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d4f33d026a6b8c20cf9791780f3adcfd56c30711 Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/meson.build | 1 + src/test/modules/test_custom_types/.gitignore | 4 + src/test/modules/test_custom_types/Makefile | 20 +++ src/test/modules/test_custom_types/README | 9 + .../expected/test_custom_types.out | 174 ++++++++++++++++++++ src/test/modules/test_custom_types/meson.build | 33 ++++ .../test_custom_types/sql/test_custom_types.sql | 104 ++++++++++++ .../test_custom_types/test_custom_types--1.0.sql | 164 +++++++++++++++++++ .../modules/test_custom_types/test_custom_types.c | 182 +++++++++++++++++++++ .../test_custom_types/test_custom_types.control | 5 + 11 files changed, 697 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: test_custom_types: Test module with fancy custom data types @ 2026-03-02 02:10 Michael Paquier <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-03-02 02:10 UTC (permalink / raw) To: [email protected] test_custom_types: Test module with fancy custom data types This commit adds a new test module called "test_custom_types", that can be used to stress code paths related to custom data type implementations. Currently, this is used as a test suite to validate the set of fixes done in 3b7a6fa15720, that requires some typanalyze callbacks that can force very specific backend behaviors, as of: - typanalyze callback that returns "false" as status, to mark a failure in computing statistics. - typanalyze callback that returns "true" but let's the backend know that no interesting stats could be computed, with stats_valid set to "false". This could be extended more in the future if more problems are found. For simplicity, the module uses a fake int4 data type, that requires a btree operator class to be usable with extended statistics. The type is created by the extension, and its properties are altered in the test. Like 3b7a6fa15720, this module is backpatched down to v14, for coverage purposes. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8eedbc2cc4b37a5e0a5f6a158ddc77b8059930bc Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/test_custom_types/.gitignore | 4 + src/test/modules/test_custom_types/Makefile | 20 +++ src/test/modules/test_custom_types/README | 9 + .../expected/test_custom_types.out | 174 +++++++++++++++++++ src/test/modules/test_custom_types/meson.build | 33 ++++ .../test_custom_types/sql/test_custom_types.sql | 104 ++++++++++++ .../test_custom_types/test_custom_types--1.0.sql | 164 ++++++++++++++++++ .../modules/test_custom_types/test_custom_types.c | 184 +++++++++++++++++++++ .../test_custom_types/test_custom_types.control | 5 + 10 files changed, 698 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: test_custom_types: Test module with fancy custom data types @ 2026-03-02 02:10 Michael Paquier <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-03-02 02:10 UTC (permalink / raw) To: [email protected] test_custom_types: Test module with fancy custom data types This commit adds a new test module called "test_custom_types", that can be used to stress code paths related to custom data type implementations. Currently, this is used as a test suite to validate the set of fixes done in 3b7a6fa15720, that requires some typanalyze callbacks that can force very specific backend behaviors, as of: - typanalyze callback that returns "false" as status, to mark a failure in computing statistics. - typanalyze callback that returns "true" but let's the backend know that no interesting stats could be computed, with stats_valid set to "false". This could be extended more in the future if more problems are found. For simplicity, the module uses a fake int4 data type, that requires a btree operator class to be usable with extended statistics. The type is created by the extension, and its properties are altered in the test. Like 3b7a6fa15720, this module is backpatched down to v14, for coverage purposes. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/858c83b3e666752710516240845b493f9c0eb60d Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/test_custom_types/.gitignore | 4 + src/test/modules/test_custom_types/Makefile | 20 +++ src/test/modules/test_custom_types/README | 9 + .../expected/test_custom_types.out | 174 +++++++++++++++++++ src/test/modules/test_custom_types/meson.build | 33 ++++ .../test_custom_types/sql/test_custom_types.sql | 104 ++++++++++++ .../test_custom_types/test_custom_types--1.0.sql | 164 ++++++++++++++++++ .../modules/test_custom_types/test_custom_types.c | 184 +++++++++++++++++++++ .../test_custom_types/test_custom_types.control | 5 + 10 files changed, 698 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: test_custom_types: Test module with fancy custom data types @ 2026-03-02 02:10 Michael Paquier <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-03-02 02:10 UTC (permalink / raw) To: [email protected] test_custom_types: Test module with fancy custom data types This commit adds a new test module called "test_custom_types", that can be used to stress code paths related to custom data type implementations. Currently, this is used as a test suite to validate the set of fixes done in 3b7a6fa15720, that requires some typanalyze callbacks that can force very specific backend behaviors, as of: - typanalyze callback that returns "false" as status, to mark a failure in computing statistics. - typanalyze callback that returns "true" but let's the backend know that no interesting stats could be computed, with stats_valid set to "false". This could be extended more in the future if more problems are found. For simplicity, the module uses a fake int4 data type, that requires a btree operator class to be usable with extended statistics. The type is created by the extension, and its properties are altered in the test. Like 3b7a6fa15720, this module is backpatched down to v14, for coverage purposes. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c0676c8294f7ad8fe56d749e030e3316bf047a4b Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/meson.build | 1 + src/test/modules/test_custom_types/.gitignore | 4 + src/test/modules/test_custom_types/Makefile | 20 +++ src/test/modules/test_custom_types/README | 9 + .../expected/test_custom_types.out | 174 +++++++++++++++++++ src/test/modules/test_custom_types/meson.build | 33 ++++ .../test_custom_types/sql/test_custom_types.sql | 104 ++++++++++++ .../test_custom_types/test_custom_types--1.0.sql | 164 ++++++++++++++++++ .../modules/test_custom_types/test_custom_types.c | 184 +++++++++++++++++++++ .../test_custom_types/test_custom_types.control | 5 + 11 files changed, 699 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-03-02 02:10 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-03-02 02:10 pgsql: test_custom_types: Test module with fancy custom data types Michael Paquier <[email protected]> 2026-03-02 02:10 pgsql: test_custom_types: Test module with fancy custom data types Michael Paquier <[email protected]> 2026-03-02 02:10 pgsql: test_custom_types: Test module with fancy custom data types Michael Paquier <[email protected]> 2026-03-02 02:10 pgsql: test_custom_types: Test module with fancy custom data types Michael Paquier <[email protected]> 2026-03-02 02:10 pgsql: test_custom_types: Test module with fancy custom data types Michael Paquier <[email protected]> 2026-03-02 02:10 pgsql: test_custom_types: Test module with fancy custom data types Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox