psql
PostgreSQL
Run a query in batch mode:
psql -Aqtc "SELECT 1;" database