Skip to content

Commit 944fdd8

Browse files
bilalkahANJU BHARTI
authored andcommitted
INSERT INTO table DEFAULT VALUES does not work properly for domain types (#625)
Fix the cook default function behavior by setting function return type. Babelfish side PR: babelfish-for-postgresql/babelfish_extensions#4130 Issues Resolved: babelfish-for-postgresql/babelfish_extensions#4069 Signed-off-by: Bilal Kahraman <kahramannbilal@gmail.com>
1 parent 2a9cadd commit 944fdd8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/backend/catalog/heap.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
#include "parser/parse_collate.h"
6767
#include "parser/parse_expr.h"
6868
#include "parser/parse_relation.h"
69+
#include "parser/parse_target.h"
6970
#include "parser/parsetree.h"
7071
#include "partitioning/partdesc.h"
7172
#include "pgstat.h"
@@ -3514,6 +3515,9 @@ cookDefault(ParseState *pstate,
35143515
format_type_be(atttypid),
35153516
format_type_be(type_id)),
35163517
errhint("You will need to rewrite or cast the expression.")));
3518+
3519+
if (handle_type_and_collation_hook)
3520+
handle_type_and_collation_hook(expr, atttypid, InvalidOid);
35173521
}
35183522

35193523
/*

0 commit comments

Comments
 (0)