Applied Zoltan's patch to make char the default sqlda type.
authorMichael Meskes <meskes@postgresql.org>
Wed, 13 Jan 2010 09:06:51 +0000 (09:06 +0000)
committerMichael Meskes <meskes@postgresql.org>
Wed, 13 Jan 2010 09:06:51 +0000 (09:06 +0000)
Given that undefined types are handled as character strings anyway the type
translation function can simply return the correcponding ECPGt_char type.

src/interfaces/ecpg/ecpglib/typename.c

index b8078e57809eac5a3b435cd17b888741ff4250f9..e281fe05d05008eb15a1d8c4d5b712e457251d16 100644 (file)
@@ -136,7 +136,8 @@ sqlda_dynamic_type(Oid type, enum COMPAT_MODE compat)
 #ifdef HAVE_LONG_INT_64
            return ECPGt_long;
 #endif
+       /* Unhandled types always return a string */
        default:
-           return (-type);
+           return ECPGt_char;
    }
 }