Yes the connection to the postgres DB is active, I can confirm connection, and I can query with the normal Query Manager. I can chec, refresh schema and view tables etc. - It's just the Custom Query that won't work.
You shouldn’t develop with your live server as active target. Also develop locally and when done and tested - then just deploy at once.
Custom queries take a full round trip to the server to execute them. In NodeJS world this will also result in restarting the server first. So if you do that on your live server it means that it have to be uploaded, server restarted, then executed etc. Which can take a while and is not very good for running on production server.
That is why we are also considering to prohibit editing server connect action on live targets as well, to also avoid the risk of accidentally breaking your live site.
As said always develop and test locally and when done publish at once to the live remote.
Ah! Didn’t realise it was caused by target selection. Makes sense - I agree that prohibiting makes sense as it doesn’t work anyway with live connection.
It feels like it’s time to completely separate dev from targets so they aren’t connected at all. Now that staging and production are prevented from page saves, maybe they become something different? I still make the mistake of pushing to production, walk away, and then sit down to develop and wonder why my changes are not reflected.
Ideally we could always be in develop mode and then without leaving that, push something to staging or production targets (of which there might be several).
Slightly related, the settings for each of the targets could also be centralized — today some target settings are on the project settings and others (like stripe keys) are on the server connect great settings.
I think I also fell into this trap (rookie error) -
Since you asked for ideas -
Rather than stopping making edits (or in addition to), perhaps a more visual way of showing what target you are working on?
Maybe a colour change in the UI? I do this with WordPress development and change the status bar colour for development, staging and live versions.
I am having this issue, I am working locally and have on my project settings development, it is not allowing me to do a simple select * from tablename is not working, not sure if there are steps before but followed the documentation, and I need to join tables, but if a simple select is giving me this same error what am I doing wrong?