pg script