Changeset: 1f82b66f648d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f82b66f648d
Modified Files:
        clients/mapiclient/dump.c
Branch: Dec2011
Log Message:

A VARCHAR must have a length, so if it doesn't, dump it as clob.
A length-less VARCHAR can be constructed:
        select substring(s,1,1) || lower(substring(s,2)) from t;
where s is of type clob.


diffs (14 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -424,7 +424,9 @@ dump_type(Mapi mid, stream *toConsole, c
                        space = mnstr_printf(toConsole, "INTERVAL SECOND");
                else
                        fprintf(stderr, "Internal error: unrecognized second 
interval %s\n", c_type_digits);
-       } else if (strcmp(c_type, "clob") == 0) {
+       } else if (strcmp(c_type, "clob") == 0 ||
+                  (strcmp(c_type, "varchar") == 0 &&
+                   strcmp(c_type_digits, "0") == 0)) {
                space = mnstr_printf(toConsole, "CHARACTER LARGE OBJECT");
                if (strcmp(c_type_digits, "0") != 0)
                        space += mnstr_printf(toConsole, "(%s)", c_type_digits);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to