You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Remove redundant documentation from PostgreSQL interface files and clarify ambiguous function names.
Move the documentation to postgres/interface.c so it can be updated without having to update N source files. The "is" function was not very specific so rename to "controlIs".
This commit is contained in:
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 8.3 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v083.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v083.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs083(const Buffer *controlFile)
|
||||
pgInterfaceControlIs083(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs083(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl083(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl083(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs083(controlFile));
|
||||
ASSERT(pgInterfaceControlIs083(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -54,11 +49,9 @@ pgInterfaceControl083(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest083(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 8.3 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs083(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs083(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl083(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 8.4 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v084.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v084.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs084(const Buffer *controlFile)
|
||||
pgInterfaceControlIs084(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs084(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl084(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl084(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs084(controlFile));
|
||||
ASSERT(pgInterfaceControlIs084(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -54,11 +49,9 @@ pgInterfaceControl084(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest084(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 8.4 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs084(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs084(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl084(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 9.0 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v090.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v090.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs090(const Buffer *controlFile)
|
||||
pgInterfaceControlIs090(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs090(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl090(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl090(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs090(controlFile));
|
||||
ASSERT(pgInterfaceControlIs090(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -54,11 +49,9 @@ pgInterfaceControl090(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest090(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 9.0 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs090(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs090(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl090(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 9.1 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v091.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v091.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs091(const Buffer *controlFile)
|
||||
pgInterfaceControlIs091(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs091(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl091(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl091(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs091(controlFile));
|
||||
ASSERT(pgInterfaceControlIs091(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -54,11 +49,9 @@ pgInterfaceControl091(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest091(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 9.1 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs091(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs091(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl091(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 9.2 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v092.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v092.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs092(const Buffer *controlFile)
|
||||
pgInterfaceControlIs092(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs092(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl092(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl092(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs092(controlFile));
|
||||
ASSERT(pgInterfaceControlIs092(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -54,11 +49,9 @@ pgInterfaceControl092(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest092(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 9.2 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs092(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs092(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl092(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 9.3 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v093.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v093.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs093(const Buffer *controlFile)
|
||||
pgInterfaceControlIs093(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs093(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl093(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl093(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs093(controlFile));
|
||||
ASSERT(pgInterfaceControlIs093(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -56,11 +51,9 @@ pgInterfaceControl093(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest093(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 9.3 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs093(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs093(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl093(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 9.4 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v094.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v094.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs094(const Buffer *controlFile)
|
||||
pgInterfaceControlIs094(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs094(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl094(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl094(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs094(controlFile));
|
||||
ASSERT(pgInterfaceControlIs094(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -56,11 +51,9 @@ pgInterfaceControl094(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest094(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 9.4 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs094(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs094(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl094(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 9.5 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v095.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v095.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs095(const Buffer *controlFile)
|
||||
pgInterfaceControlIs095(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs095(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl095(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl095(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs095(controlFile));
|
||||
ASSERT(pgInterfaceControlIs095(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -56,11 +51,9 @@ pgInterfaceControl095(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest095(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 9.5 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs095(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs095(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl095(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 9.6 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v096.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v096.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs096(const Buffer *controlFile)
|
||||
pgInterfaceControlIs096(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs096(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl096(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl096(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs096(controlFile));
|
||||
ASSERT(pgInterfaceControlIs096(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -56,11 +51,9 @@ pgInterfaceControl096(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest096(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 9.6 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs096(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs096(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl096(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 10 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v100.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v100.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs100(const Buffer *controlFile)
|
||||
pgInterfaceControlIs100(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs100(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl100(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl100(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs100(controlFile));
|
||||
ASSERT(pgInterfaceControlIs100(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -56,11 +51,9 @@ pgInterfaceControl100(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest100(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 10 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs100(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs100(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl100(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -1,20 +1,17 @@
|
||||
/***********************************************************************************************************************************
|
||||
PostgreSQL 11 Interface
|
||||
|
||||
See postgres/interface.c for documentation.
|
||||
***********************************************************************************************************************************/
|
||||
#include "common/debug.h"
|
||||
#include "common/log.h"
|
||||
#include "postgres/interface/v110.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Include PostgreSQL Types
|
||||
***********************************************************************************************************************************/
|
||||
#include "postgres/interface/v110.auto.c"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is the control file for this version of PostgreSQL?
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
bool
|
||||
pgInterfaceIs110(const Buffer *controlFile)
|
||||
pgInterfaceControlIs110(const Buffer *controlFile)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM(BUFFER, controlFile);
|
||||
@ -28,9 +25,7 @@ pgInterfaceIs110(const Buffer *controlFile)
|
||||
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Get information from pg_control in a common format
|
||||
***********************************************************************************************************************************/
|
||||
/**********************************************************************************************************************************/
|
||||
PgControl
|
||||
pgInterfaceControl110(const Buffer *controlFile)
|
||||
{
|
||||
@ -39,7 +34,7 @@ pgInterfaceControl110(const Buffer *controlFile)
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(controlFile != NULL);
|
||||
ASSERT(pgInterfaceIs110(controlFile));
|
||||
ASSERT(pgInterfaceControlIs110(controlFile));
|
||||
|
||||
PgControl result = {0};
|
||||
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
|
||||
@ -56,11 +51,9 @@ pgInterfaceControl110(const Buffer *controlFile)
|
||||
FUNCTION_LOG_RETURN(PG_CONTROL, result);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create pg_control for testing
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef DEBUG
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
void
|
||||
pgInterfaceControlTest110(PgControl pgControl, Buffer *buffer)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ PostgreSQL 11 Interface
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
bool pgInterfaceIs110(const Buffer *controlFile);
|
||||
bool pgInterfaceControlIs110(const Buffer *controlFile);
|
||||
PgControl pgInterfaceControl110(const Buffer *controlFile);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
Reference in New Issue
Block a user