This article explains how to use PostgreSQL Recursive SQL and the PL/pgSQL function to draw fractal graphs (with examples).