mirror of https://github.com/citusdata/citus.git
Semmle: Fix obvious issues (#3502)
Fixes some obvious issues found by the Semmle static analysis tool.
(cherry picked from commit 00d667c41d
)
pull/3647/head
parent
e2d49c6122
commit
b451c31c4c
|
@ -137,7 +137,7 @@ AppendAlterTypeStmt(StringInfo buf, AlterTableStmt *stmt)
|
||||||
stmt->relation->relname);
|
stmt->relation->relname);
|
||||||
ListCell *cmdCell = NULL;
|
ListCell *cmdCell = NULL;
|
||||||
|
|
||||||
Assert(stmt->relkind = OBJECT_TYPE);
|
Assert(stmt->relkind == OBJECT_TYPE);
|
||||||
|
|
||||||
appendStringInfo(buf, "ALTER TYPE %s", identifier);
|
appendStringInfo(buf, "ALTER TYPE %s", identifier);
|
||||||
foreach(cmdCell, stmt->cmds)
|
foreach(cmdCell, stmt->cmds)
|
||||||
|
|
|
@ -123,7 +123,7 @@ master_create_empty_shard(PG_FUNCTION_ARGS)
|
||||||
*/
|
*/
|
||||||
if (relationKind == RELKIND_FOREIGN_TABLE)
|
if (relationKind == RELKIND_FOREIGN_TABLE)
|
||||||
{
|
{
|
||||||
bool cstoreTable = cstoreTable = CStoreTable(relationId);
|
bool cstoreTable = CStoreTable(relationId);
|
||||||
if (cstoreTable)
|
if (cstoreTable)
|
||||||
{
|
{
|
||||||
storageType = SHARD_STORAGE_COLUMNAR;
|
storageType = SHARD_STORAGE_COLUMNAR;
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CITUS_FUNCTION_UTILS_H
|
||||||
|
#define CITUS_FUNCTION_UTILS_H
|
||||||
|
|
||||||
|
#include "postgres.h"
|
||||||
|
|
||||||
#include "nodes/execnodes.h"
|
#include "nodes/execnodes.h"
|
||||||
|
|
||||||
|
@ -18,3 +22,5 @@ extern Oid FunctionOidExtended(const char *schemaName, const char *functionName,
|
||||||
argumentCount, bool missingOK);
|
argumentCount, bool missingOK);
|
||||||
extern ReturnSetInfo * FunctionCallGetTupleStore1(PGFunction function, Oid functionId,
|
extern ReturnSetInfo * FunctionCallGetTupleStore1(PGFunction function, Oid functionId,
|
||||||
Datum argument);
|
Datum argument);
|
||||||
|
|
||||||
|
#endif /* CITUS_FUNCTION_UTILS_H */
|
||||||
|
|
Loading…
Reference in New Issue