Add pgfuncs.sql which provides several useful SQLs.