sqlwrite still broken in R2021a for datatype conversions (JDBC and Native drivers)
2 views (last 30 days)
My question here has still gone unanswered, i.e. miliseconds are dropping on insert (windows 10, postgres, ODBC, r2020a), triggering a unique constraint violation from the database. I figured I'll use 2021a, on linux, with a native postgres driver (JDBC also doesnt work). Now I can't even get to the spot to replicate the original error (milliseconds dropping) before I am faced with a different but related error.
Checking the type of dt_start gives
So it is asking for a numeric array or cell array of numeric scalars, this must mean datevec.
Also no. Lets try casting into a cell array.
Now it wants it to be a datetime?? Only this throws the same error as before where it asks for scalars. So lets try strings and char arrays. however, trying any of this errors and I'm asked to use scalars. Using scalars I'm asked to use characters. This is absolute insanity. What is the fix??
Nothing works. The postgres type category for this column in the database is 'D'
psql#> select oid, typname, typcategory from pg_catalog.pg_type where typname like 'timestamptz';
1184 timestamptz D
when looking at +database/+postgre/@connection/connection.m, we can see on line 257 this category is not selected, and for whatever reason, the string category is listed twice.
I am unable to debug this in any systematic way or edit the file without matlab crashing.
So two problems, same problem space, different OS and drivers. Please what is the solution? Thanks.