You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Remove too-verbose braces in switch statements.
The original intention was to enclose complex code in braces but somehow braces got propagated almost everywhere. Document the standard for braces in switch statements and update the code to reflect the standard.
This commit is contained in:
@ -280,36 +280,28 @@ pgClientQuery(PgClient *this, const String *query)
|
||||
{
|
||||
// Boolean type
|
||||
case 16: // bool
|
||||
{
|
||||
varLstAdd(resultRow, varNewBool(varBoolForce(varNewStrZ(value))));
|
||||
break;
|
||||
}
|
||||
|
||||
// Text/char types
|
||||
case 18: // char
|
||||
case 19: // name
|
||||
case 25: // text
|
||||
{
|
||||
varLstAdd(resultRow, varNewStrZ(value));
|
||||
break;
|
||||
}
|
||||
|
||||
// Integer types
|
||||
case 20: // int8
|
||||
case 21: // int2
|
||||
case 23: // int4
|
||||
case 26: // oid
|
||||
{
|
||||
varLstAdd(resultRow, varNewInt64(cvtZToInt64(value)));
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
THROW_FMT(
|
||||
FormatError, "unable to parse type %u in column %d for query '%s'",
|
||||
columnType[columnIdx], columnIdx, strZ(query));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user