[libgda] postgres: added debug information for _routines metadata



commit 7a6441f82b40ac4a690567761c7d870107525b1c
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Wed Jan 9 16:10:27 2019 -0600

    postgres: added debug information for _routines metadata

 providers/reuseable/postgres/gda-postgres-meta.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/providers/reuseable/postgres/gda-postgres-meta.c 
b/providers/reuseable/postgres/gda-postgres-meta.c
index 0c9834201..d86796a5c 100644
--- a/providers/reuseable/postgres/gda-postgres-meta.c
+++ b/providers/reuseable/postgres/gda-postgres-meta.c
@@ -1720,6 +1720,17 @@ _gda_postgres_meta__routines (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnecti
                /* nothing for this version of PostgreSQL */
                return TRUE;
        }
+#ifdef GDA_DEBUG
+               gchar *st = gda_connection_statement_to_sql (cnc, internal_stmt[I_STMT_ROUTINES_ALL], 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_ALL],
                                                              NULL,


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