title: How to import external sql scripts from a sql script in PostgreSQL?
body: <p>I was wondering if it is possible/how to <code>include</code> one .sql file in another .sql file, as is done in other programming languages like C or Java?</p>
  
  <p>I am asking because I wanted to organize my sql scripts into support library files and application scripts, and so on. I searched around, and solutions seem to be about loading .sql files from the psql client (see e.g. <a href="https://stackoverflow.com/questions/129445/">postgreSQL - psql \i : how to execute script in a given path</a>). What I am interested in is to load a library .sql script from inside a sql script.</p>
  
  <p>P.S. I am using PL/pgSQL (PostgreSQL 9.3).</p>