I'm working on a project that collects information about your schema from the database directly. I can get the data_type
of the column using information_schema.columns
, which will tell me if it's an ARRAY
or not. I can also get the underlying type (integer
, bytea
etc) of the ARRAY
by querying information_schema.element_types
as described here:
https://www.postgresql.org/docs/9.1/static/infoschema-element-types.html
My problem is that I also need to know how many dimensions the array has, whether it is integer[]
, or integer[][]
for example. Does anyone know of a way to do this? Google isn't being very helpful here, hopefully someone more familiar with the Postgres spec can lead me in the right direction.