Database

Working With Arrays

PostgreSQL supports flexible array types. These arrays are also supported in the Supabase Dashboard and in the JavaScript API.

Create a table with an array column

Create a test table with a text array (an array of strings):

Insert a record with an array value

View the results

Query array data

PostgreSQL uses 1-based indexing (e.g., textarray[1] is the first item in the array).

Resources