MATLAB <--> PostgreSQL interface (w/o toolbox) -- "relation <tablename> does not exist"
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hey
i'm new to the forum, but i have already looked for a solution to my problem, so i hope, i haven't missed anything and am not reposting old stuff.
here's what i'm trying to do: i'm trying to read data from a PostgreSQL database and do not have the database toolbox. i found this very helpul bit of information:
i pretty much copy-pasted this code (w/ little adaptions) and now have the following problem:
[...] sql='SELECT * FROM my_table_name'; ps=conn.prepareStatement(sql); rs=ps.executeQuery(); [...]
when the last line that i quoted here executes, an error message is displayed, which basically says "relation my_table_name does not exist". (i'm sorry i can't provide the exact error message, since i don't have access to the database right now, so i can't establish a connection).
i'm pretty sure it has nothing to do with those wide-spread upper-/lowercase-issues, since the tables all seem to be named with lowercase letters (also, i did already try including '' and ""-marks).
also, i'm pretty sure that the connection to the database is properly established in the previous code, since "sql='SELECT * FROM pg_catalog.pg_tables';" does return data.
maybe i have to address the table differently / in more detail?
i'm sorry that i can't provide the postgresql-version due to the above mentioned temporary lack of connection to the server. if necessary, i'll add this info asap. apart from that, i'm running MATLAB R2011b (7.13) on a ubuntu 13.04 OS.
i'd appreciate every bit of advice! :)
oh and by the way: the driver i'm using is: 'postgresql-9.2-1002.jdbc4.jar' (i don't think it's of any importance though, since -- as already mentioned -- i believe that the connection is properly working.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Database Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!