Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfeacabd

Browse files
committed
[PBCKP-308] Changed check_server_version function for postgresql version for 1c.
1 parentba6b240 commitfeacabd

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
#ifdefPGPRO_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)

[8]ページ先頭

©2009-2025 Movatter.jp