From ebe124eacd7c3faa36ed358e7cc1d7c5b419e5f6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:18:09 +0200 Subject: Merging upstream version 15.6. Signed-off-by: Daniel Baumann --- src/test/regress/expected/fast_default.out | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/test/regress/expected/fast_default.out') diff --git a/src/test/regress/expected/fast_default.out b/src/test/regress/expected/fast_default.out index 91f2571..59365da 100644 --- a/src/test/regress/expected/fast_default.out +++ b/src/test/regress/expected/fast_default.out @@ -272,7 +272,25 @@ SELECT comp(); Rewritten (1 row) +-- check that we notice insertion of a volatile default argument +CREATE FUNCTION foolme(timestamptz DEFAULT clock_timestamp()) + RETURNS timestamptz + IMMUTABLE AS 'select $1' LANGUAGE sql; +ALTER TABLE T ADD COLUMN c3 timestamptz DEFAULT foolme(); +NOTICE: rewriting table t for reason 2 +SELECT attname, atthasmissing, attmissingval FROM pg_attribute + WHERE attrelid = 't'::regclass AND attnum > 0 + ORDER BY attnum; + attname | atthasmissing | attmissingval +---------+---------------+--------------- + pk | f | + c1 | f | + c2 | f | + c3 | f | +(4 rows) + DROP TABLE T; +DROP FUNCTION foolme(timestamptz); -- Simple querie CREATE TABLE T (pk INT NOT NULL PRIMARY KEY); SELECT set('t'); -- cgit v1.2.3