sqlwrite still broken in R2021a for datatype conversions (JDBC and Native drivers)

2 visualizzazioni (ultimi 30 giorni)
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??
I've tried
datenum(dt_start)
datevec(dt_start)
num2cell(dt_start)
num2cell(datevec(dt_start))
datestr(dt_start)
string(dt_start)
{datestr(dt_start)}
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.

Risposte (0)

Prodotti


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by