The PSQL command lineIf you are interested in running commands other than those available in the CLI interface, you can install the standard Postgres PSQL command-line tools. The Amazon CLI tool is clearly focused on management functionality and not on the execution of queries. To connect using the psql command line, you need three values: -h (hostname), -p (port), and -U (user). You will then be prompted for the password as shown in the following command:# psql -h <Endpoint> -p 5439 -U <user> There are many other options to pass in files, how you wish to have the output formatted, or setting variables as described here.
Even outside of AWS, the PSQL command line tools are super useful for pulling data from a DB for small ad-hoc reporting tools, especially managing/manipulating queries in plain text files using the -F option
Share this highlighthttp://www.safaribooksonline.com/a/getting-started-with/65/