[libgda] PostgreSQL: Fixing SIGSEG error



commit ca22e9885f66dc9fcd5cb53981e4f67daf2c525e
Author: Pavlo Solntsev <p sun fun gmail com>
Date:   Thu Oct 8 16:19:06 2020 -0500

    PostgreSQL: Fixing SIGSEG error
    
    Currently, libgda uses template1 default database to connect to before
    a new database can be created. If more than one connection is
    established to the template1 database a new database can't be created.
    
    'postgres' database should be used to connect to before any other
    database connection is established.
    
    See relevant discussion here:
    https://www.postgresql.org/list/pgsql-sql/2020-10
    
    Message-ID: 390804abe88e4e9da9049f6e05c841783acaca47 camel gmail com
    
    This bug affects the following issues:
    https://gitlab.gnome.org/GNOME/libgda/-/issues/194
    https://gitlab.gnome.org/GNOME/libgda/-/issues/221

 providers/postgres/gda-postgres-provider.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/providers/postgres/gda-postgres-provider.c b/providers/postgres/gda-postgres-provider.c
index 77936c035..c2828d1bb 100644
--- a/providers/postgres/gda-postgres-provider.c
+++ b/providers/postgres/gda-postgres-provider.c
@@ -1007,7 +1007,7 @@ gda_postgres_provider_perform_operation (GdaServerProvider *provider, GdaConnect
                         g_string_append_printf (string, "host='%s'", pq_host);
                 if (pq_port > 0)
                         g_string_append_printf (string, " port=%d", pq_port);
-                g_string_append_printf (string, " dbname='%s'", pq_db ? pq_db : "template1");
+                g_string_append_printf (string, " dbname='%s'", pq_db ? pq_db : "postgres");
                 if (pq_options && *pq_options)
                         g_string_append_printf (string, " options='%s'", pq_options);
                 if (pq_user && *pq_user)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]