You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-06-18 23:57:33 +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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user