Postgresql Array Functions Python Programming