PG_VERSION_NUM > 110000 should be PG_VERSION_NUM >= 110000

Also fix a > 12000 typo
pull/3057/head
Philip Dubé 2019-09-30 19:03:27 +00:00 committed by Philip Dubé
parent 1989ff85b5
commit 29f1ea079b
5 changed files with 15 additions and 15 deletions

View File

@ -77,7 +77,7 @@ static void ErrorIfFunctionDependsOnExtension(const ObjectAddress *functionAddre
PG_FUNCTION_INFO_V1(create_distributed_function);
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
#define AssertIsFunctionOrProcedure(objtype) \
Assert((objtype) == OBJECT_FUNCTION || (objtype) == OBJECT_PROCEDURE)
#else
@ -795,7 +795,7 @@ CreateFunctionStmtObjectAddress(CreateFunctionStmt *stmt, bool missing_ok)
ObjectWithArgs *objectWithArgs = NULL;
ListCell *parameterCell = NULL;
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
if (stmt->is_procedure)
{
objectType = OBJECT_PROCEDURE;
@ -828,7 +828,7 @@ PlanAlterFunctionStmt(AlterFunctionStmt *stmt, const char *queryString)
List *commands = NIL;
/* AlterFunctionStmt->objtype has only been added since pg11 */
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
AssertIsFunctionOrProcedure(stmt->objtype);
#endif
@ -1168,7 +1168,7 @@ AlterFunctionStmtObjectAddress(AlterFunctionStmt *stmt, bool missing_ok)
{
ObjectType objectType = OBJECT_FUNCTION;
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
objectType = stmt->objtype;
#endif

View File

@ -10,7 +10,7 @@
#include "postgres.h"
#if PG_VERSION_NUM > 12000
#if PG_VERSION_NUM >= 120000
#include "access/genam.h"
#endif
#include "access/htup_details.h"

View File

@ -121,7 +121,7 @@ PlanAlterObjectSchemaStmt(AlterObjectSchemaStmt *stmt, const char *queryString)
return PlanAlterTypeSchemaStmt(stmt, queryString);
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:
@ -198,7 +198,7 @@ ProcessAlterObjectSchemaStmt(AlterObjectSchemaStmt *stmt, const char *queryStrin
return;
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:

View File

@ -426,7 +426,7 @@ multi_ProcessUtility(PlannedStmt *pstmt,
break;
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:
@ -484,7 +484,7 @@ multi_ProcessUtility(PlannedStmt *pstmt,
break;
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:
@ -843,7 +843,7 @@ PlanAlterOwnerStmt(AlterOwnerStmt *stmt, const char *queryString)
return PlanAlterTypeOwnerStmt(stmt, queryString);
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:
@ -871,7 +871,7 @@ PlanAlterObjectDependsStmt(AlterObjectDependsStmt *stmt, const char *queryString
{
switch (stmt->objectType)
{
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:

View File

@ -143,7 +143,7 @@ RenameStmtObjectAddress(RenameStmt *stmt, bool missing_ok)
return RenameAttributeStmtObjectAddress(stmt, missing_ok);
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:
@ -170,7 +170,7 @@ AlterObjectSchemaStmtObjectAddress(AlterObjectSchemaStmt *stmt, bool missing_ok)
return AlterTypeSchemaStmtObjectAddress(stmt, missing_ok);
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:
@ -218,7 +218,7 @@ AlterOwnerStmtObjectAddress(AlterOwnerStmt *stmt, bool missing_ok)
return AlterTypeOwnerObjectAddress(stmt, missing_ok);
}
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION:
@ -250,7 +250,7 @@ AlterObjectDependsStmtObjectAddress(AlterObjectDependsStmt *stmt, bool missing_o
{
switch (stmt->objectType)
{
#if PG_VERSION_NUM > 110000
#if PG_VERSION_NUM >= 110000
case OBJECT_PROCEDURE:
#endif
case OBJECT_FUNCTION: