Commit 36254948 authored by Pavlo Solntsev's avatar Pavlo Solntsev Committed by Daniel Espinosa Ortiz

PostgreSQL improvements

parent d03432ea
......@@ -4,6 +4,9 @@
# see https://hub.docker.com/_/gcc/
image: ubuntu:devel
services:
- postgres:latest
stages:
- build
......@@ -31,9 +34,18 @@ variables:
libgee-0.8-dev
valadoc
libgladeui-dev
postgresql-client
postgresql-client-common
GIT_SUBMODULE_STRATEGY: normal
GDA_PSQ_HOST: postgres
GDA_PSQ_PASSWORD: "postgres"
GDA_PSQ_USER: postgres
SQLITE_DBCREATE_PARAMS: "DB_DIR=."
SQLITE_CNC_PARAMS: "DB_DIR=."
POSTGRESQL_DBCREATE_PARAMS: "HOST=$GDA_PSQ_HOST;PORT=5432;ADM_LOGIN=$GDA_PSQ_USER;ADM_PASSWORD='$GDA_PSQ_PASSWORD'"
POSTGRESQL_CNC_PARAMS: "HOST=$GDA_PSQ_HOST;PORT=5432;USERNAME=$GDA_PSQ_USER;PASSWORD='$GDA_PSQ_PASSWORD'"
before_script:
- apt update && apt -y install $DEPENDENCIES
......
......@@ -36,14 +36,12 @@ gda_postgres_render_CREATE_DB (GdaServerProvider *provider, GdaConnection *cnc,
string = g_string_new ("CREATE DATABASE ");
tmp = gda_connection_operation_get_sql_identifier_at (cnc, op, "/DB_DEF_P/DB_NAME", error);
if (!tmp) {
g_string_free (string, TRUE);
return NULL;
}
value = gda_server_operation_get_value_at (op, "/DB_DEF_P/DB_NAME");
if (!value)
return NULL;
g_string_append (string, tmp);
g_free (tmp);
if (value && G_VALUE_HOLDS (value, G_TYPE_STRING) && g_value_get_string (value))
g_string_append (string, g_value_get_string (value));
value = gda_server_operation_get_value_at (op, "/DB_DEF_P/OWNER");
if (value && G_VALUE_HOLDS (value, G_TYPE_STRING) && g_value_get_string (value)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment