Code validation not detecting Postgres tables
Answered
Hi,
I have configured my Postgres database in IntelliJi and its showing up correctly. I use 2 scheme in my application. "dach" and "users".
Scheme dach has a table orders but the code inspection is not finding the table. In fact its not finding any table, not one in dach nor one in users.
I have already set the SQL Resolution Scope of the apps folder explicitly to this database but no change.
Any ideas are welcome
Thanks
Please sign in to leave a comment.
Could you please provide us with a full query you're trying to execute? With a sample Postgres database, I wasn't able to reproduce the problem.
Hi Olga,
that's the main problem. It does not depend on the query and also not on the schema.
without giving an explicit schema does not work either.
It worked fine as long as I had only one schema and the schema name was "public" (What seems to be Postgres default schema if you create a new database). But when I removed the "public" schema and created the two new ones, none of them is recognized by Intelliji
Ok,
I finally found out, that if I set the Resolution Scope for only one file to the used schema it works.
But is there no way to add a whole folder to the the scope? Its much work to set it for each file one by one.
Ok,
just removed all scopes, removed all datasources, added new datasource, added new default scope and now it works.
Some times you not not understand everything
Thanks for your help anyway
I'm happy it works fine now!
Please, let me know if you have further questions or requests.