I was wondering if it is possible/how to include
one .sql file in another .sql file, as is done in other programming languages like C or Java?
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. postgreSQL - psql \i : how to execute script in a given path). What I am interested in is to load a library .sql script from inside a sql script.
P.S. I am using PL/pgSQL (PostgreSQL 9.3).