Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3c3bd22

Browse files
author
Marina Polyakova
committed
Fix the value of PG_UNKNOWN from Alexander Korotkov
Do not use negative values for the PgEdition enumeration, since the bitwise shifting is used for them in CONTROLFILE_SET_OLDEDITION (see pg_control.h). + fix the description of pgpro_utils.c
1 parent fb98f12 commit 3c3bd22

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/fe_utils/pgpro_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2017, Postgres Professional
66
*
7-
* src/include/fe_utils/pgpro_utils.h
7+
* src/fe_utils/pgpro_utils.c
88
*
99
*-------------------------------------------------------------------------
1010
*/

src/include/common/edition.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#ifndef EDITION_H
22
#define EDITION_H
33

4+
/*
5+
* Do not use negative values here, because the bitwise shifting is used for
6+
* them in CONTROLFILE_SET_OLDEDITION (see pg_control.h).
7+
*/
48
typedef enum
59
{
6-
PG_UNKNOWN = -1,
10+
PG_UNKNOWN = 0xFFFF,
711
PG_ORIGINAL = 0,
812
PGPRO_STANDARD = ('P'<<8|'P'),
913
PGPRO_STANDARD_CERTIFIED = ('P'<<8|'C'),

0 commit comments

Comments
 (0)