SELECT c.column_name, c.data_type, e.data_type AS element_type
FROM information_schema.columns c LEFT JOIN information_schema.element_types e
ON ((c.table_catalog, c.table_schema, c.table_name, 'TABLE', c.dtd_identifier)
- = (e.object_catalog, e.object_schema, e.object_name, e.object_type, e.dtd_identifier))
+ = (e.object_catalog, e.object_schema, e.object_name, e.object_type, e.collection_type_identifier))
WHERE c.table_schema = '...' AND c.table_name = '...'
ORDER BY c.ordinal_position;
</programlisting>
</row>
<row>
- <entry><literal>dtd_identifier</literal></entry>
+ <entry><literal>collection_type_identifier</literal></entry>
<entry><type>sql_identifier</type></entry>
<entry>
The identifier of the data type descriptor of the array being
- described
+ described. Use this to join with the
+ <literal>dtd_identifier</literal> columns of other information
+ schema views.
</entry>
</row>
<entry><type>cardinal_number</type></entry>
<entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</></entry>
</row>
+
+ <row>
+ <entry><literal>dtd_identifier</literal></entry>
+ <entry><type>sql_identifier</type></entry>
+ <entry>
+ An identifier of the data type descriptor of the element. This
+ is currently not useful.
+ </entry>
+ </row>
</tbody>
</tgroup>
</table>