GNOME Bugzilla – Bug 515306
Implement /FIELDS_A/@COLUMN_AUTOINC/
Last modified: 2008-03-24 22:34:14 UTC
Please describe the problem: Using 3.99.1: Its necesary to implement /FIELDS_A/@COLUMN_AUTOINC/ in order to allow create 'SERIAL' type fields for PKEYs like in SQLite and MySQL. Steps to reproduce: 1. Set to true /FIELDS_A/@COLUMN_AUTOINC/ at a field 2. Execute ServerOperation Actual results: The rendered operation ignores /FIELDS_A/@COLUMN_AUTOINC/ and just sets the PKEY Expected results: The field must be created as a SERIAL type and a PKey Does this happen every time? Yes Other information: I've modified the code, see PATCH, to see if /FIELDS_A/@COLUMN_AUTOINC/ is setted to TRUE to set the type to SERIAL automaticaly, but when I get the value fails to check for holds boolean. See the next code: if (gda_server_operation_set_value_at (op, "TRUE", error, "/FIELDS_A/@COLUMN_PKEY/%d", i)) g_printf ("SETTED VALUE AT PKEY\n"); if (gda_server_operation_set_value_at (op, "TRUE", error, "/FIELDS_A/@COLUMN_AUTOINC/%d", i)) g_printf ("SETTED VALUE AT PKEY\n"); /* The last allways return TRUE to confir the value is setted */ /* This lines get the values for AUTOINC and PKEY nodes to print then to stdout*/ g_printf ("SETTED PKEY AND AUTOINC- Value at AutoInc: %s AT PKEY: %s\n", gda_value_stringify (g_value_get_boolean (gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_AUTOINC/%d", i))),gda_value_stringify (g_value_get_boolean (gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_AUTOINC/%d", i)))); /* g_value_get_boolean allways return NULL becouse value doesn't holds a BOOLEAN */
Created attachment 104747 [details] [review] Patch to add AUTOINC to PostgreSQL provider This patch does't work becouse a problem with gda_server_operation_get_value allways return NULL
Created attachment 105590 [details] [review] Patch to add AUTOINC support in PostgreSQL and improve gda_create_table convenient function
*** Bug 515528 has been marked as a duplicate of this bug. ***
I've applied the parts regarding the auto increment in V4 branch, but could you post another patch againts that latest V4 branch for the rest?
The V4 branch has now been merged into trunk