r18096 - gnucash/trunk/src/backend/dbi - Use default postgresql port number for connections.

Phil Longstaff plongstaff at code.gnucash.org
Sat May 30 14:42:26 EDT 2009


Author: plongstaff
Date: 2009-05-30 14:42:26 -0400 (Sat, 30 May 2009)
New Revision: 18096
Trac: http://svn.gnucash.org/trac/changeset/18096

Modified:
   gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
Log:
Use default postgresql port number for connections.


Modified: gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
===================================================================
--- gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c	2009-05-29 22:59:29 UTC (rev 18095)
+++ gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c	2009-05-30 18:42:26 UTC (rev 18096)
@@ -62,6 +62,7 @@
 #define FILE_URI_PREFIX (FILE_URI_TYPE "://")
 #define SQLITE3_URI_TYPE "sqlite3"
 #define SQLITE3_URI_PREFIX (SQLITE3_URI_TYPE "://")
+#define PGSQL_DEFAULT_PORT 5432
 
 typedef gchar* (*CREATE_TABLE_DDL_FN)( GncSqlConnection* conn,
 								const gchar* table_name,
@@ -489,7 +490,7 @@
         LEAVE( " " );
         return;
 	}
-	result = dbi_conn_set_option_numeric( be->conn, "port", 0 );
+	result = dbi_conn_set_option_numeric( be->conn, "port", PGSQL_DEFAULT_PORT );
 	if( result < 0 ) {
 		PERR( "Error setting 'port' option\n" );
         qof_backend_set_error( qbe, ERR_BACKEND_SERVER_ERR );



More information about the gnucash-changes mailing list