Question: How do I executed PostgreSQL Commands inside a Linux / UNIX shell script? Answer: With the help of the psql interactive terminal, you can execute the psql commands from the shell script. For this purpose, you should enable the password less login by pg_hba.conf, or .pgpass. Syntax psql DBNAME USERNAME << EOF statement 1; [...]
PostgreSQL database
Some of the open source application comes with postgreSQL database. To maintain those application, companies may not hire a fulltime postgreSQL DBA. Instead they may request the existing Oracle DBA, or Linux system administrator, or programmers to maintain the potgreSQL. In this article let discuss about the 15 practical postgresql database commands which will be [...]
Earlier we discussed about how to install PostgreSQL database on Linux from source. In this article, let us review top 15 practical postgreSQL DBA command examples. If you are a mySQL administrator, check-out our 15 examples of mysqladmin command article that we discussed a while back. 1. How to change PostgreSQL root user password ? [...]
Similar to mySQL, postgreSQL is very famous and feature packed free and open source database. Earlier we’ve discussed several installations including LAMP stack installation, Apache2 installation from source, PHP5 installation from source and mySQL installation. In this article, let us review how to install postgreSQL database on Linux from source code. Step 1: Download postgreSQL [...]
This is a guest post written by SathiyaMoorthy pg_dump is an effective tool to backup postgres database. It creates a *.sql file with CREATE TABLE, ALTER TABLE, and COPY SQL statements of source database. To restore these dumps psql command is enough. Using pg_dump, you can backup a local database and restore it on a [...]