Skip to content

Commit 3244106

Browse files
committed
issue about null pointer dereference
1 parent f219796 commit 3244106

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/postgres_deparse.c

+2
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,8 @@ static void deparseAlterIdentityColumnOptionList(StringInfo str, List *l)
15241524
else if (strcmp(def_elem->defname, "generated") == 0)
15251525
{
15261526
appendStringInfoString(str, "SET GENERATED ");
1527+
if(def_elem->arg == NULL)
1528+
elog(ERROR, "missing argument for identity generation specification");
15271529
if (intVal(def_elem->arg) == ATTRIBUTE_IDENTITY_ALWAYS)
15281530
appendStringInfoString(str, "ALWAYS");
15291531
else if (intVal(def_elem->arg) == ATTRIBUTE_IDENTITY_BY_DEFAULT)

0 commit comments

Comments
 (0)