PostgreSQL - INSERT an array of composite type containing arrays
问题 I have a composite type containing arrays of TEXT, etc. I am using this inside my main table to create an array of composite type. How do I generate an INSERT command (without using the default field names of the composite type) ? Can I create a TEMPORARY TABLE with the array of composites and then insert it into the main table? For example: DROP TABLE collection; DROP TABLE book_set; DROP TYPE book; CREATE TYPE book AS ( title TEXT, authors TEXT[], extra_spare TEXT ); CREATE TEMPORARY TABLE