[libgda] ci: enable debug messages
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] ci: enable debug messages
- Date: Wed, 9 Jan 2019 21:15:38 +0000 (UTC)
commit 4fdf73b6a083c52c796227252d1dd4a45c1f8206
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Wed Jan 9 15:14:32 2019 -0600
ci: enable debug messages
Added debug messages for _routine table for PostgreSQL
.gitlab-ci.yml | 4 ++--
providers/reuseable/postgres/gda-postgres-meta.c | 29 ++++++++++++++++++++----
2 files changed, 27 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e495e2ce1..ab84ce26a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -73,7 +73,7 @@ meson_build:
script:
- export PGPASSWORD=$POSTGRES_PASSWORD
- psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT 'OK' AS status;"
- - meson _build --prefix=/usr -Denable-ci-environment=true
+ - meson _build --prefix=/usr -Denable-ci-environment=true -Denable-debug
- cd _build
- ninja
- broadwayd &
@@ -114,4 +114,4 @@ pages:
- mv doc/C/libgdaui/html public/C/libgdaui-6.0
artifacts:
paths:
- - public
+ - public
\ No newline at end of file
diff --git a/providers/reuseable/postgres/gda-postgres-meta.c
b/providers/reuseable/postgres/gda-postgres-meta.c
index bc991c688..0c9834201 100644
--- a/providers/reuseable/postgres/gda-postgres-meta.c
+++ b/providers/reuseable/postgres/gda-postgres-meta.c
@@ -1720,7 +1720,6 @@ _gda_postgres_meta__routines (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnecti
/* nothing for this version of PostgreSQL */
return TRUE;
}
-
model = gda_connection_statement_execute_select_full (cnc,
internal_stmt[I_STMT_ROUTINES_ALL],
NULL,
@@ -1763,19 +1762,41 @@ _gda_postgres_meta_routines (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnectio
if (routine_name_n) {
if (! gda_holder_set_value (gda_set_get_holder (i_set, "name"), routine_name_n, error))
return FALSE;
+#ifdef GDA_DEBUG
+ gchar *st = gda_connection_statement_to_sql (cnc, internal_stmt[I_STMT_ROUTINES_ONE], i_set,
GDA_STATEMENT_SQL_PARAMS_AS_VALUES, NULL, error);
+ if (st == NULL) {
+ g_warning ("Error rendering Routines SQL For ONE Routine: %s",
+ (*error) && (*error)->message ?
(*error)->message : "No error set");
+ g_clear_error (error);
+ } else {
+ g_message ("Routine SQL: %s", st);
+ g_free (st);
+ }
+#endif
model = gda_connection_statement_execute_select_full (cnc,
internal_stmt[I_STMT_ROUTINES_ONE],
i_set,
GDA_STATEMENT_MODEL_RANDOM_ACCESS,
_col_types_routines, error);
- }
- else
+ } else {
+#ifdef GDA_DEBUG
+ gchar *st = gda_connection_statement_to_sql (cnc, internal_stmt[I_STMT_ROUTINES], i_set,
GDA_STATEMENT_SQL_PARAMS_AS_VALUES, NULL, error);
+ if (st == NULL) {
+ g_warning ("Error rendering Routines SQL For Routines In Catalog: %s",
+ (*error) && (*error)->message ? (*error)->message : "No
error set");
+ g_clear_error (error);
+ } else {
+ g_message ("Routine SQL: %s", st);
+ g_free (st);
+ }
+#endif
model = gda_connection_statement_execute_select_full (cnc,
internal_stmt[I_STMT_ROUTINES],
i_set,
GDA_STATEMENT_MODEL_RANDOM_ACCESS,
_col_types_routines, error);
- if (!model)
+ }
+ if (model == NULL)
return FALSE;
gda_meta_store_set_reserved_keywords_func (store, _gda_postgres_reuseable_get_reserved_keywords_func
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]