mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-18 11:45:11 +08:00
When using psql output redirection only the query results get written to the output file which makes it hard to identify misbehaving queries by looking at the output. This patch changes the query script to use \qecho to output query comments in the output file as well to make identifying queries in the results output easier. This patch also moves the queries that test error behaviour into a separate file to keep that output out of the results diff.
19 lines
903 B
SQL
19 lines
903 B
SQL
-- This file and its contents are licensed under the Apache License 2.0.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-APACHE for a copy of the license.
|
|
|
|
\set ON_ERROR_STOP 0
|
|
|
|
\qecho test timestamp upper boundary
|
|
\qecho this will error because even though the transformation results in a valid timestamp
|
|
\qecho our supported range of values for time is smaller then postgres
|
|
:PREFIX SELECT * FROM metrics_timestamp WHERE time_bucket('1d',time) < '294276-01-01'::timestamp ORDER BY time;
|
|
\qecho transformation would be out of range
|
|
|
|
\qecho test timestamptz upper boundary
|
|
\qecho this will error because even though the transformation results in a valid timestamp
|
|
\qecho our supported range of values for time is smaller then postgres
|
|
:PREFIX SELECT time FROM metrics_timestamptz WHERE time_bucket('1d',time) < '294276-01-01'::timestamptz ORDER BY time;
|
|
|
|
\set ON_ERROR_STOP 1
|