diff --git a/src/test/regress/expected/pg17.out b/src/test/regress/expected/pg17.out index 1141efef00b..95c8cd283d2 100644 --- a/src/test/regress/expected/pg17.out +++ b/src/test/regress/expected/pg17.out @@ -1462,12 +1462,68 @@ CREATE TABLE date_partitioned_table( eventdate date, measure_data jsonb) PARTITION BY RANGE(eventdate); SELECT create_time_partitions('date_partitioned_table', INTERVAL 'infinity', '2022-01-01', '2021-01-01'); -ERROR: Partition interval must be a finite value -CONTEXT: PL/pgSQL function create_time_partitions(regclass,interval,timestamp with time zone,timestamp with time zone) line XX at RAISE + create_time_partitions +--------------------------------------------------------------------- + t +(1 row) + SELECT create_time_partitions('date_partitioned_table', INTERVAL '-infinity', '2022-01-01', '2021-01-01'); -ERROR: Partition interval must be a finite value -CONTEXT: PL/pgSQL function create_time_partitions(regclass,interval,timestamp with time zone,timestamp with time zone) line XX at RAISE +ERROR: partition date_partitioned_table_p2021 with the range from 01-01-2021 to infinity does not align with the initial partition given the partition interval +HINT: Only use partitions of the same size, without gaps between partitions. +CONTEXT: PL/pgSQL function get_missing_time_partition_ranges(regclass,interval,timestamp with time zone,timestamp with time zone) line XX at RAISE +PL/pgSQL function create_time_partitions(regclass,interval,timestamp with time zone,timestamp with time zone) line XX at FOR over SELECT rows -- end of testing interval with infinite values +-- various jsonpath methods were added in PG17 +-- relevant PG commit: https://github.com/postgres/postgres/commit/66ea94e8e +-- here we add the same test as in pg15_jsonpath.sql for the new additions +CREATE TABLE jsonpath_test (id serial, sample text); +SELECT create_distributed_table('jsonpath_test', 'id'); + create_distributed_table +--------------------------------------------------------------------- + +(1 row) + +\COPY jsonpath_test(sample) FROM STDIN +-- Cast the text into jsonpath on the worker nodes. +SELECT sample, sample::jsonpath FROM jsonpath_test ORDER BY id; + sample | sample +--------------------------------------------------------------------- + $.bigint().integer().number().decimal() | $.bigint().integer().number().decimal() + $.boolean() | $.boolean() + $.date() | $.date() + $.decimal(4,2) | $.decimal(4,2) + $.string() | $.string() + $.time() | $.time() + $.time(6) | $.time(6) + $.time_tz() | $.time_tz() + $.time_tz(4) | $.time_tz(4) + $.timestamp() | $.timestamp() + $.timestamp(2) | $.timestamp(2) + $.timestamp_tz() | $.timestamp_tz() + $.timestamp_tz(0) | $.timestamp_tz(0) +(13 rows) + +-- Pull the data, and cast on the coordinator node +WITH samples as (SELECT id, sample FROM jsonpath_test OFFSET 0) +SELECT sample, sample::jsonpath FROM samples ORDER BY id; + sample | sample +--------------------------------------------------------------------- + $.bigint().integer().number().decimal() | $.bigint().integer().number().decimal() + $.boolean() | $.boolean() + $.date() | $.date() + $.decimal(4,2) | $.decimal(4,2) + $.string() | $.string() + $.time() | $.time() + $.time(6) | $.time(6) + $.time_tz() | $.time_tz() + $.time_tz(4) | $.time_tz(4) + $.timestamp() | $.timestamp() + $.timestamp(2) | $.timestamp(2) + $.timestamp_tz() | $.timestamp_tz() + $.timestamp_tz(0) | $.timestamp_tz(0) +(13 rows) + +-- End of testing jsonpath methods \set VERBOSITY terse SET client_min_messages TO WARNING; DROP SCHEMA pg17 CASCADE; diff --git a/src/test/regress/sql/pg17.sql b/src/test/regress/sql/pg17.sql index 888a0463ce7..3d400a5259a 100644 --- a/src/test/regress/sql/pg17.sql +++ b/src/test/regress/sql/pg17.sql @@ -812,6 +812,38 @@ SELECT create_time_partitions('date_partitioned_table', INTERVAL '-infinity', '2 -- end of testing interval with infinite values +-- various jsonpath methods were added in PG17 +-- relevant PG commit: https://github.com/postgres/postgres/commit/66ea94e8e +-- here we add the same test as in pg15_jsonpath.sql for the new additions + +CREATE TABLE jsonpath_test (id serial, sample text); +SELECT create_distributed_table('jsonpath_test', 'id'); + +\COPY jsonpath_test(sample) FROM STDIN +$.bigint().integer().number().decimal() +$.boolean() +$.date() +$.decimal(4,2) +$.string() +$.time() +$.time(6) +$.time_tz() +$.time_tz(4) +$.timestamp() +$.timestamp(2) +$.timestamp_tz() +$.timestamp_tz(0) +\. + +-- Cast the text into jsonpath on the worker nodes. +SELECT sample, sample::jsonpath FROM jsonpath_test ORDER BY id; + +-- Pull the data, and cast on the coordinator node +WITH samples as (SELECT id, sample FROM jsonpath_test OFFSET 0) +SELECT sample, sample::jsonpath FROM samples ORDER BY id; + +-- End of testing jsonpath methods + \set VERBOSITY terse SET client_min_messages TO WARNING; DROP SCHEMA pg17 CASCADE;