I wonder if there is an alternative to the psql command to test the connection to a postgresql database using bash.
I'm setting up a Core OS cluster and have a side service which should perform the equivalent of psql 'host=xxx port=xxx dbname=xxx user=xxx'
every minute to determine if the service is running, and more important, if one can connect to it using the given parameters).
I cannot install postgres directly on Core OS. The command usually used in Core OS is something like curl -f ${COREOS_PUBLIC_IPV4}:%i;
. But it tells only if the service itself is running on the given port, without any access check.
Thank you in advance!