timescaledb/tsl/test/shared/sql/include/memoize_query.sql
Fabrízio de Royes Mello f25e795ec8 Add regression tests for Memoize Node
PostgreSQL 14 introduced new `Memoize Node` that serve as a cache of
results from parameterized nodes.

We should make sure it will work correctly together with ChunckAppend
custom node over hypertables (compressed and uncompressed).

Closes #3684
2021-10-15 19:20:33 -03:00

12 lines
372 B
SQL

-- This file and its contents are licensed under the Timescale License.
-- Please see the included NOTICE for copyright information and
-- LICENSE-TIMESCALE for a copy of the license.
SHOW enable_memoize;
:PREFIX
SELECT m1.time, m2.time
FROM :TEST_TABLE m1
LEFT JOIN LATERAL (SELECT time FROM :TEST_TABLE m2 WHERE m1.time = m2.time LIMIT 1) m2 ON true
ORDER BY m1.time;