Commit 155d0c3d authored by Daniel Espinosa Ortiz's avatar Daniel Espinosa Ortiz

postgres: fixes for types schemas

parent bd63b6a1
......@@ -107,6 +107,12 @@
<gda_value isnull="t"/>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>information_schema.yes_or_no</gda_value>
<gda_value>gchararray</gda_value>
<gda_value isnull="t"/>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>int2</gda_value>
<gda_value>GdaShort</gda_value>
......@@ -131,12 +137,30 @@
<gda_value>@ &lt;number&gt; &lt;units&gt;, time interval</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>json</gda_value>
<gda_value>gchararray</gda_value>
<gda_value isnull="t"/>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>jsonb</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>Binary JSON</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>macaddr</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>XX:XX:XX:XX:XX:XX, MAC address</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>macaddr8</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>XX:XX:XX:XX:XX:XX:XX:XX, MAC address</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>money</gda_value>
<gda_value>gchararray</gda_value>
......@@ -155,6 +179,30 @@
<gda_value>geometric path '(pt1,...)'</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>pg_dependencies</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>multivariate dependencies</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>pg_lsn</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>PostgreSQL LSN datatype</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>pg_ndistinct</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>multivariate ndistinct coefficients</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>pg_node_tree</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>string representing an internal node tree</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>polygon</gda_value>
<gda_value>gchararray</gda_value>
......@@ -173,6 +221,18 @@
<gda_value>registered text search dictionary</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>regnamespace</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>registered namespace</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>regrole</gda_value>
<gda_value>gchararray</gda_value>
<gda_value>registered role</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>reltime</gda_value>
<gda_value>gchararray</gda_value>
......@@ -188,25 +248,25 @@
<gda_array_row>
<gda_value>time</gda_value>
<gda_value>GdaTime</gda_value>
<gda_value>hh:mm:ss, ANSI SQL time</gda_value>
<gda_value>time of day</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>timestamp</gda_value>
<gda_value>GdaTimestamp</gda_value>
<gda_value>GDateTime</gda_value>
<gda_value>date and time</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>timestamptz</gda_value>
<gda_value>GdaTimestamp</gda_value>
<gda_value>GDateTime</gda_value>
<gda_value>date and time with time zone</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
<gda_value>timetz</gda_value>
<gda_value>GdaTime</gda_value>
<gda_value>hh:mm:ss, ANSI SQL time</gda_value>
<gda_value>time of day with time zone</gda_value>
<gda_value isnull="t"/>
</gda_array_row>
<gda_array_row>
......
......@@ -334,6 +334,7 @@ prov_test_common_check_meta_identifiers (gboolean case_sensitive, gboolean updat
GDA_SERVER_OPERATION_CREATE_TABLE, NULL, &error);
g_assert (operation);
gda_server_operation_set_value_at (operation, table_name, NULL, "/TABLE_DEF_P/TABLE_NAME");
gda_server_operation_set_value_at (operation, "TRUE", NULL, "/TABLE_DEF_P/TABLE_IFNOTEXISTS");
gda_server_operation_set_value_at (operation, "id", NULL, "/FIELDS_A/@COLUMN_NAME/0");
gda_server_operation_set_value_at (operation, "int", NULL, "/FIELDS_A/@COLUMN_TYPE/0");
gda_server_operation_set_value_at (operation, "TRUE", NULL, "/FIELDS_A/@COLUMN_PKEY/0");
......
......@@ -53,7 +53,9 @@ compare_data_model_with_expected (GdaDataModel *model, const gchar *expected_fil
g_object_unref (compare_m);
return FALSE;
}
gchar *dmodel = gda_data_model_dump_as_string (compare_m);
g_message ("Expected file: %s\nExpected schema:\n%s", expected_file, dmodel);
g_free (dmodel);
/* compare number of rows and columns */
gint ncols, nrows, row, col;
ncols = gda_data_model_get_n_columns (model);
......@@ -183,6 +185,9 @@ prov_test_check_types_schema (GdaConnection *cnc)
#endif
return FALSE;
}
gchar *dmod = gda_data_model_dump_as_string (schema_m);
g_message ("Meta Types from connection:\n%s", dmod);
g_free (dmod);
str = g_strdup_printf ("TYPES_SCHEMA_%s.xml", gda_connection_get_provider_name (cnc));
if (CREATE_FILES) {
......
......@@ -310,7 +310,7 @@ test_cnc_clean_connection (GdaConnection *cnc, GError **error)
if (destroy_db) {
GdaServerOperation *op;
gchar *dbname;
const gchar *db_params;
GdaQuarkList *db_quark_list = NULL;
......@@ -330,13 +330,18 @@ test_cnc_clean_connection (GdaConnection *cnc, GError **error)
g_free (str);
g_assert (db_params);
op = gda_server_operation_prepare_drop_database (prov_id, dbname, NULL);
op = gda_server_operation_prepare_drop_database (prov_id, dbname, error);
if (op == NULL) {
g_warning ("Error Dropping Database: %s", (*error)->message ? (*error)->message : "No Datails");
g_free (dbname);
return FALSE;
}
g_free (dbname);
db_quark_list = gda_quark_list_new_from_string (db_params);
gda_quark_list_foreach (db_quark_list, (GHFunc) db_drop_quark_foreach_func, op);
gda_quark_list_free (db_quark_list);
if (!gda_server_operation_perform_drop_database (op, NULL, error))
if (!gda_server_operation_perform_drop_database (op, prov_id, error))
retval = FALSE;
g_object_unref (op);
}
......
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