Intellisense not working correctly after 2017.2 update

I am having issues w/ intellisense after the lasted upgrade. I am using Postgres trying to take advantage of the new enhancement which allows one connection to switch between databases.

I have one connection to my PG server, I then include multiple databases and Syncronize all of them. When I write a query intellisense is only returning object names from one of the databases.

Is anyone else having this issue? Something similar happened when I updated to 2017.1 which I also made a post about (link below).

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000138284-Autocomplete-not-working-correctly-after-2017-1-update

6 comments
Comment actions Permalink

Hi,

Maybe you need to change search path and mention all databases, schemas you want to work with?

Could you provide any examples, screenshots?

Thank you.

0
Comment actions Permalink

It seems to be working, but in an odd way. Below are the sync'd dbs I'm using

If I open a console window and make sure the drop down in the top left is connected to login they type "SELECT * FROM" I only get intellisense from nishared.

If I open the drop down, manually select dbo as the search path, and then hit ok, I'll get intellsense for login.

Also, if I include dbo. in my query it will then show intellsense for login. Is there a reason this is not automatically using dbo as the search path and then I have to set it every time I connect to the db?

0
Comment actions Permalink

Hi,

What's default search path for your user?

When you change search patch manually it'll be working until you disconnect.

Thank you.

 

0
Comment actions Permalink

Looks like the default search path for those databases are all dbo. Yea, I see it stays set while I'm connected. Just seems weird I have to tell it to connect the first time or include dbo in my first query to get it to work. Also, it is odd that it always works for nishared when connected to login prior to manually setting it to dbo.

I guess if that is just how it works I'll have to remember to prefix my first query to get it to switch over.

0
Comment actions Permalink


Hi,

When nothing selected in switcher

the query will be executed in default database or schema for a current user.

You can set server wide search path for your user by:



ALTER DATABASE <database_name> SET search_path TO schema1,schema2;

ALTER ROLE <role_name> SET search_path TO schema1,schema2;

See https://www.postgresql.org/docs/current/static/sql-alterrole.html

Thank you.

0
Comment actions Permalink

They query itself runs fine, it's just the intellisense doesn't work so great until the drop down you have a screen shot of actually says the db name as well as schema. Which I either have to set manually or run a query and then it sets it. It's not a huge issue once we figured it out. So thanks for the help!

0

Please sign in to leave a comment.