Postgres Array Length Function In Cpp