[MASSMAIL]call ATPostAlterTypeParse inconsistency - Mailing list pgsql-hackers

From jian he
Subject [MASSMAIL]call ATPostAlterTypeParse inconsistency
Date
Msg-id CACJufxGk8nBdamJFatbPawu9jqeqTz+wWgCG0YQMm+HW-dJcDg@mail.gmail.com
Whole thread Raw
List pgsql-hackers
hi.
one minor issue.

within ATPostAlterTypeCleanup, we call ATPostAlterTypeParse:
ATPostAlterTypeParse(oldId, relid, InvalidOid,
(char *) lfirst(def_item),
wqueue, lockmode, tab->rewrite);


function ATPostAlterTypeParse is:
static void
ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid refRelId, char *cmd,
List **wqueue, LOCKMODE lockmode, bool rewrite)

but tab->rewrite is an int.
so within ATPostAlterTypeCleanup we should call it like:

ATPostAlterTypeParse(oldId, relid, InvalidOid,
(char *) lfirst(def_item),
wqueue, lockmode, tab->rewrite != 0);

or

ATPostAlterTypeParse(oldId, relid, InvalidOid,
(char *) lfirst(def_item),
wqueue, lockmode, tab->rewrite > 0);



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fix out-of-bounds in the function GetCommandTagName
Next
From: Michael Paquier
Date:
Subject: Re: Stability of queryid in minor versions