[7947] Use "NUMERIC" type instead of "BIGINT" in mysql_to_pgsql convertor.

This commit is contained in:
AlexDereka 2009-06-02 15:09:38 +04:00
parent d2f654217d
commit de2338c9a4
2 changed files with 14 additions and 3 deletions

View file

@ -89,9 +89,20 @@ string ConvertNativeType(enum_field_types mysqlType, uint32 length)
case FIELD_TYPE_INT24: case FIELD_TYPE_INT24:
return "integer"; return "integer";
case FIELD_TYPE_LONGLONG: case FIELD_TYPE_LONGLONG:
return "int8";
case FIELD_TYPE_LONG: case FIELD_TYPE_LONG:
return "bigint"; {
string temp;
char str[10];
temp = "numeric";
if (length)
{
temp.append("(");
sprintf(str,"%d",length);
temp.append(str);
temp.append(")");
}
return temp;
}
case FIELD_TYPE_DECIMAL: case FIELD_TYPE_DECIMAL:
case FIELD_TYPE_FLOAT: case FIELD_TYPE_FLOAT:
case FIELD_TYPE_DOUBLE: case FIELD_TYPE_DOUBLE:

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7946" #define REVISION_NR "7947"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__