Skip to content

Commit feacabd

Browse files
committed
[PBCKP-308] Changed check_server_version function for postgresql version for 1c.
1 parent ba6b240 commit feacabd

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/backup.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,21 @@ check_server_version(PGconn *conn, PGNodeInfo *nodeInfo)
946946
*/
947947
#ifdef PGPRO_VERSION
948948
if (!res)
949+
{
949950
/* It seems we connected to PostgreSQL (not Postgres Pro) */
950-
elog(ERROR, "%s was built with Postgres Pro %s %s, "
951-
"but connection is made with PostgreSQL %s",
952-
PROGRAM_NAME, PG_MAJORVERSION, PGPRO_EDITION, nodeInfo->server_version_str);
951+
if(strcmp(PGPRO_EDITION, "1C") != 0)
952+
{
953+
elog(ERROR, "%s was built with Postgres Pro %s %s, "
954+
"but connection is made with PostgreSQL %s",
955+
PROGRAM_NAME, PG_MAJORVERSION, PGPRO_EDITION, nodeInfo->server_version_str);
956+
}
957+
/* We have PostgresPro for 1C and connect to PostgreSQL or PostgresPro for 1C
958+
* Check the major version
959+
*/
960+
if (strcmp(nodeInfo->server_version_str, PG_MAJORVERSION) != 0)
961+
elog(ERROR, "%s was built with PostgrePro %s %s, but connection is made with %s",
962+
PROGRAM_NAME, PG_MAJORVERSION, PGPRO_EDITION, nodeInfo->server_version_str);
963+
}
953964
else
954965
{
955966
if (strcmp(nodeInfo->server_version_str, PG_MAJORVERSION) != 0 &&

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy