Using Postgres PSQL CLI in DataGrip

I have seen in the pgAdmin the very convenient way to use psql with right click context in a database. I can't find a way in the datagrip and it is very annoying to have always open the pgAdmin for that reason. I have used the External Tools way but it doesn't work as I want. It is appeared in main tool bar and it doesn't work with argument macros like -h $DS_HOST$ -p $DS_PORT$ -U $DS_USER$ -d $DS_DATABASE$

0
Hi,

That's correct. You need to set up psql as External Tool and use the macros available in our IDE:

https://www.jetbrains.com/help/datagrip/built-in-macros.html

The specific arguments you mentioned are not listed, so you have to add your own custom macros. May I know what your use case is?
0

Thank you for your response but about “May I know what your use case is?” I think that I was very clear! Nevertheless it looks like rocket science in compare to the FREE pgAdmin.

0
Sorry, it's just not often that we get feedback about using the psql CLI with arguments in the IDE, since many use cases are already covered by the UI. This is the reason why I was asking for your use case in CLI and why it's so important. Based on user feedback, we're considering new features. So I'd really appreciate if you could share your daily routine. 
0

DataGrip doesn’t have a native “Open psql here” feature like pgAdmin. The best workaround is an External Tool opened from the Database context menu using macros like $Host$, $Port$, $User$, and $Database$ instead of $DS_*. That works much more reliably in newer versions.

0

请先登录再写评论。