Hi,
I am using Windows 8.1 Turkish locale,
When I add a table to postgres and than add a column type to integer, logs shows that Unknown datatype "İNTEGER" for "id". Fall back to UNKNOWN.
I wonder the cause of this issue is İNTEGER INTEGER difference?
PostgreSQL
Sample Log output is as follows.
* Unknown datatype "İNTEGER" for "a_id". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(4,0)" for "model". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(1,0)" for "renk_id". Fall back to UNKNOWN. */
/* Unknown datatype "İNTEGER" for "k_id". Fall back to UNKNOWN. */
* Unknown datatype "İNTEGER" for "a_id". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(4,0)" for "model". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(1,0)" for "renk_id". Fall back to UNKNOWN. */
/* Unknown datatype "İNTEGER" for "k_id". Fall back to UNKNOWN. */
Please post the results of the following query here:
Please replace "YOUR_TABLE_NAME" with the name of your table.
SELECT DISTINCT a.attname AS column_name, a.attnum, a.atttypid, FORMAT_TYPE(a.atttypid, a.atttypmod) AS data_type, CASE a.attnotnull WHEN FALSE THEN 'YES' ELSE 'NO' END AS IS_NULLABLE, com.description AS column_comment, def.adsrc AS column_default, NULL AS character_maximum_length
FROM pg_attribute AS a
JOIN pg_class AS pgc ON pgc.oid = a.attrelid
LEFT JOIN pg_description AS com ON (pgc.oid = com.objoid AND a.attnum = com.objsubid)
LEFT JOIN pg_attrdef AS def ON (a.attrelid = def.adrelid AND a.attnum = def.adnum)
WHERE a.attnum > 0 AND pgc.oid = a.attrelid AND pg_table_is_visible(pgc.oid) AND NOT a.attisdropped AND pgc.relname = 'YOUR_TABLE_NAME'
ORDER BY a.attnum;
Please replace "YOUR_TABLE_NAME" with the name of your table.
Please do the following:
* Activate Tools > Preferences > Logging > "Debug messages" (and click "OK")
* Click the table so you see the table editor
* Watch out for debug messages in the SQL logging area, and post these here.
Secondly:
* Again, execute the above query to get the column details
* This time, export the result as text, not as a screenshot: You can export the grid data by right click > "Export grid rows" > "Excel CSV" and attach that .csv file here.
* Activate Tools > Preferences > Logging > "Debug messages" (and click "OK")
* Click the table so you see the table editor
* Watch out for debug messages in the SQL logging area, and post these here.
Secondly:
* Again, execute the above query to get the column details
* This time, export the result as text, not as a screenshot: You can export the grid data by right click > "Export grid rows" > "Excel CSV" and attach that .csv file here.
Step1
Unknown datatype "İNTEGER" for "a_id". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(4,0)" for "model". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(1,0)" for "renk_id". Fall back to UNKNOWN. */
/* Unknown datatype "İNTEGER" for "k_id". Fall back to UNKNOWN. */
Unknown datatype "İNTEGER" for "a_id". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(4,0)" for "model". Fall back to UNKNOWN. */
/* Unknown datatype "NUMERİC(1,0)" for "renk_id". Fall back to UNKNOWN. */
/* Unknown datatype "İNTEGER" for "k_id". Fall back to UNKNOWN. */
Secondly
1 attachment(s):
Code modification/commit
57ec1bc
from ansgarbecker,
9 years ago,
revision 9.2.0.4958
Fix column type converted to locale string format by String.ToUpper in TDBConnection.GetCreateCode - prefer String.ToUpperInvariant instead, to avoid funny characters in data types. See http://www.heidisql.com/forum.php?t=18466
Please login to leave a reply, or register at first.