Tag Archives: PostgreSQL

Saving PostgreSQL Query Output to File

If you have used Oracle databases, you are probably familiar with the SPOOL command. In Oracle, you can use the SPOOL command to save query output (to file) that gets generated in SQLPLUS. Postgres has the ‘psql’ command line tool … Continue reading

Posted in Uncategorized | Tagged , , , , , | 3 Comments

PostgreSQL information_schema

PostgreSQL has a special schema named information_schema where it stores meta data about database objects (somewhat like Oracle’s DBA_* tables). If you want to iterate over all the tables in some schema and do some special processing on each of … Continue reading

Posted in Database | Tagged , , , , | Leave a comment

Using COPY command in PostgreSQL

Postgres has a very useful ‘COPY’ command that can be used to transfer data between text files and database tables. This is somewhat similar to Oracle’s SQLLDR utility. I will discuss some of the basic commands to get data from … Continue reading

Posted in Database | Tagged , , , , , , , | 2 Comments