From 27b2af9474003da843fb93bba59fe4297841291b Mon Sep 17 00:00:00 2001 From: Lukas Fittl Date: Wed, 18 Dec 2024 09:31:41 -0800 Subject: [PATCH] Deparser: Add additional test case for DEFAULT in ALTER TABLE Co-authored-by: Tyler Gannon --- test/deparse_tests.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/deparse_tests.c b/test/deparse_tests.c index 04dff0b7..69cac931 100644 --- a/test/deparse_tests.c +++ b/test/deparse_tests.c @@ -413,6 +413,7 @@ const char* tests[] = { "CREATE TABLE my_table (created_at timestamptz NOT NULL DEFAULT (now() AT TIME ZONE 'UTC'))", "CREATE TABLE my_table (created_at timestamptz NOT NULL DEFAULT (now() AT LOCAL))", "CREATE TABLE my_table (created_at timestamptz NOT NULL DEFAULT '1 hour'::interval + (current_timestamp AT TIME ZONE 'UTC'))", + "ALTER TABLE my_table ADD COLUMN created_at timestamptz NOT NULL DEFAULT '1 hour'::interval + (current_timestamp AT TIME ZONE 'UTC')", "CREATE TABLE my_table (created_at int NOT NULL DEFAULT 1 + 2)" };