When defining an array, the syntax allows for the array to be defined either as fixed-length or variable-length, however as of PostgreSQL 7.1.2, the fixed-length size restriction is not enforced. This means that you may treat the array as having a fixed number of elements at all times, but it can still be dynamically sized depending on the context in which it is treated. For example, it is perfectly acceptable for a single column defined as an array to contain three values in one record, four values in another, and no values in a third.

Additionally, arrays may be defined as being multi-dimensional , meaning that each element of the array may actually represent another array , rather than an atomic value. Values which are selected from a multi-dimensional array will consist of nested curly braces in order to show an array within an array.

booktown=# SELECT editions FROM my_notes WHERE title='The Cat in the Hat';
 {{"039480001X","1st Ed, Hard Cover"},{"0394900014","1st Ed"}}
(1 row)