1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Clean up more code using "(expr) ? true : false"

This is similar to fd0625c, taking care of any remaining code paths that
are worth the cleanup.  This also changes some cases using opposite
expression patterns.

Author: Justin Pryzby, Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoCdF8dnUvr-BUWWGvA_XhKSoANacBMZb6jKyCk4TYfQ2Q@mail.gmail.com
This commit is contained in:
Michael Paquier
2021-10-11 09:36:42 +09:00
parent 3eb1f4d097
commit 68f7c4b57a
7 changed files with 16 additions and 17 deletions

View File

@ -7463,7 +7463,7 @@ ATExecColumnDefault(Relation rel, const char *colName,
* operation when the user asked for a drop.
*/
RemoveAttrDefault(RelationGetRelid(rel), attnum, DROP_RESTRICT, false,
newDefault == NULL ? false : true);
newDefault != NULL);
if (newDefault)
{