Updated to remove reliance on postgres_ext. Each source is recorded as a separate row instead of an entry in an array.