stof error using fetch with postgresql connection on ubuntu
Show older comments
I'm having a strange and difficult to reproduce error fetching data from my postgre database using the native interface.
I can fetch my (quite large) dataset fine running in a windows 10 environment, however when using Ubuntu 20.04 (eithier bare metal, or in a docker container running a customerised version of the offical image) I get the following error: 'stof'. It's in red and absolutely no further explentation is provided. Google has not been my friend (appearently it's a function in the C++ 11 standard libary?, not sure that helps).
It's hard to provide code to reproduce it without my data, but it happens here:
% journeyId is a number, dbConn is a postgresql connection
%SamplesAndData is quite a wide view, which oftern has a lot of null
%columns
q = sprintf('SELECT * FROM public."SamplesAndData" WHERE "Journey" = %d', journeyId);
rawData = fetch(dbConn, q); %exception here
I've tried breaking the import into chunks and confusingly it doesn't always happen on the same row in the database, however it does almost always happen. With small enougn datasets (journeyId's in this example) it sometimes works.
I've tried the databaseDatastore as an alterntive, with the same results.
Answers (1)
Chris Morris
on 29 Jun 2023
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!