Fixed the problem that appeared after the Postgresql 18 upgrade by updating all DataGrip plugins.
Go to Settings in Main menu, select Plugins and update them all. Restart DataGrip.