1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 00:28:52 +02:00

Remove double spaces from comments and documentation.

Double spaces have fallen out of favor in recent years because they no longer contribute to readability.

We have been using single spaces and editing related paragraphs for some time, but now it seems best to update the remaining instances to avoid churn in unrelated commits and to make it clearer what spacing contributors should use.
This commit is contained in:
David Steele
2023-05-02 12:57:12 +03:00
parent 5ea7b91bf9
commit 1bd5530a59
130 changed files with 1111 additions and 1113 deletions

View File

@ -290,7 +290,7 @@ pgClientQuery(PgClient *const this, const String *const query, const PgClientQue
// Else convert the value to a variant
else
{
// Convert column type. Not all PostgreSQL types are supported but these should suffice.
// Convert column type. Not all PostgreSQL types are supported but these should suffice.
switch (columnType[columnIdx])
{
// Boolean type

View File

@ -1,8 +1,8 @@
/***********************************************************************************************************************************
PostgreSQL Client
Connect to a PostgreSQL database and run queries. This is not intended to be a general purpose client but is suitable for
pgBackRest's limited needs. In particular, data type support is limited to text, int, and bool types so it may be necessary to add
Connect to a PostgreSQL database and run queries. This is not intended to be a general purpose client but is suitable for
pgBackRest's limited needs. In particular, data type support is limited to text, int, and bool types so it may be necessary to add
casts to queries to output one of these types.
***********************************************************************************************************************************/
#ifndef POSTGRES_QUERY_H

View File

@ -1,12 +1,12 @@
/***********************************************************************************************************************************
PostgreSQL Page Checksum Algorithm
For each supported release of PostgreSQL check the code in this file to see if it has changed. The easiest way to do this is to
copy and paste in place and check git to see if there are any diffs. Tabs should be copied as is to make this process easy even
For each supported release of PostgreSQL check the code in this file to see if it has changed. The easiest way to do this is to
copy and paste in place and check git to see if there are any diffs. Tabs should be copied as is to make this process easy even
though the pgBackRest project does not use tabs elsewhere.
Since the checksum implementation and page format do not (yet) change between versions this code should be copied verbatim from
src/include/storage/checksum_impl.h for each new release. Only the newest released version of the code should be used.
src/include/storage/checksum_impl.h for each new release. Only the newest released version of the code should be used.
Modifications need to be made after copying:

View File

@ -4,15 +4,15 @@ PostgreSQL Types That Do Not Vary By Version
Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
Portions Copyright (c) 1994, Regents of the University of California
For each supported release of PostgreSQL check the types in this file to see if they have changed. The easiest way to do this is to
copy and paste in place and check git to see if there are any diffs. Tabs should be copied as is to make this process easy even
For each supported release of PostgreSQL check the types in this file to see if they have changed. The easiest way to do this is to
copy and paste in place and check git to see if there are any diffs. Tabs should be copied as is to make this process easy even
though the pgBackRest project does not use tabs elsewhere.
Comments should be copied with the types they apply to, even if the comment has not changed. This does get repetitive, but has no
Comments should be copied with the types they apply to, even if the comment has not changed. This does get repetitive, but has no
runtime cost and makes the rules a bit easier to follow.
If a comment is changed then the newer comment should be copied. If the *type* has changed then it must be moved to version.auto.c
which could have a large impact on dependencies. Hopefully that won't happen often.
If a comment is changed then the newer comment should be copied. If the *type* has changed then it must be moved to version.auto.c
which could have a large impact on dependencies. Hopefully that won't happen often.
Note when adding new types it is safer to add them to version.auto.c unless they are needed for code that must be compatible across
all versions of PostgreSQL supported by pgBackRest.

View File

@ -4,22 +4,22 @@ PostgreSQL Types That Vary By Version
Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
Portions Copyright (c) 1994, Regents of the University of California
For each supported release of PostgreSQL check the types in this file to see if they have changed. The easiest way to do this is to
copy and paste in place and check git to see if there are any diffs. Tabs should be copied as is to make this process easy even
For each supported release of PostgreSQL check the types in this file to see if they have changed. The easiest way to do this is to
copy and paste in place and check git to see if there are any diffs. Tabs should be copied as is to make this process easy even
though the pgBackRest project does not use tabs elsewhere.
New versions should always be added to the top of each type's #if block, underneath `PG_VERSION > PG_VERSION_MAX` to cause as little
churn as possible. This also ensures that new versions will not work until PG_VERSION_MAX and this file have been updated.
churn as possible. This also ensures that new versions will not work until PG_VERSION_MAX and this file have been updated.
New data structures do not need to add #elif branches for old versions. See pg_time_t as an example.
Comments should be copied with the types they apply to, even if the comment has not changed. This does get repetitive, but has no
Comments should be copied with the types they apply to, even if the comment has not changed. This does get repetitive, but has no
runtime cost and makes the rules a bit easier to follow.
If a comment has syntax only changes, then the new version of the comment can be applied to older versions of the type.
If a comment has changed in a way that implies a difference in the way the type is used, then a new version of the comment and type
should be created. See the CheckPoint type difference between 9.5 and 9.6 as an example.
should be created. See the CheckPoint type difference between 9.5 and 9.6 as an example.
***********************************************************************************************************************************/
#include "postgres/interface/static.vendor.h"
#include "postgres/version.h"