@@ -946,10 +946,21 @@ check_server_version(PGconn *conn, PGNodeInfo *nodeInfo)
946
946
*/
947
947
#ifdef PGPRO_VERSION
948
948
if (!res )
949
+ {
949
950
/* 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
+ }
953
964
else
954
965
{
955
966
if (strcmp (nodeInfo -> server_version_str , PG_MAJORVERSION ) != 0 &&
0 commit comments