Skip to content

Commit 5024c5c

Browse files
author
Tanya Gupta
committed
handling declare variables
Signed-off-by: Tanya Gupta <[email protected]>
1 parent c4373d0 commit 5024c5c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/backend/nodes/nodeFuncs.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,14 @@ exprTypmod(const Node *expr)
302302
{
303303
if (!expr)
304304
return -1;
305+
if (exprTypmod_hook)
306+
{
307+
int32 typmod = exprTypmod_hook(NULL, (Node *) expr);
308+
if (typmod != -1)
309+
{
310+
return typmod;
311+
}
312+
}
305313

306314
switch (nodeTag(expr))
307315
{
@@ -541,9 +549,6 @@ exprTypmod(const Node *expr)
541549
break;
542550
}
543551

544-
if (exprTypmod_hook)
545-
return exprTypmod_hook(NULL, (Node *) expr);
546-
547552
return -1;
548553
}
549554

0 commit comments

Comments
 (0)