PostGreSQL Tutorial

Introduction

The PostGreSQL distribution provides several tutorials.

Tutorial

  1. Change directory to the PostGreSQL tutorial directory:
    
    % cd /util/postgresql/share/tutorial/
    
    
  2. List the tutorial files that are available:
    
    tutorial% ls *.sql
    advanced.sql  basics.sql  complex.sql  funcs.sql  syscat.sql
    
    
  3. Launch the PostGreSQL client in 'single step' mode:
    
    tutorial% psql -s
    
    
  4. Read commands from a specified file, in this case, basics.sql:
    
    cwmiller=> \i basics.sql
    
    
  5. View the tutorial's content.
  6. Quit:
    
    cwmiller=> \q
    
    

References

  1. http://www.postgresql.org/docs/8.4/interactive/tutorial-sql-intro.html