Skip to content

[BUG] Error when importing Postgres schema with arrays #525

@jmbit

Description

@jmbit

Describe the bug
Importing Postgres schemas with arrays fails with the following error:

{"id":"6U1px3PHl0T0RjJ7ehIGi","name":"table_0","x":0,"y":0,"locked":false,"fields":[{"name":"id","type":"INTEGER","default":"","check":"","primary":true,"unique":true,"notNull":true,"increment":true,"comment":"","id":"IS44C5o0z6P6kY5yfkfXG"},{"id":"minJnZ_3uLWJu5UY3fX5x","name":"test","type":"TEXT","default":"","check":"","primary":false,"unique":false,"notNull":false,"increment":false,"comment":"","size":"","values":[],"isArray":true}],"comment":"","indices":[],"color":"#175e7a"}

To Reproduce
Steps to reproduce the behavior:

  1. Create Postgres Project
  2. Go to 'File/Import from SQL'
  3. Select SQL schema file with array, like one of the table definitions from the docs page: https://www.postgresql.org/docs/current/arrays.html
  4. Click 'Import'
  5. See error
    Expected behavior
    Correctly import Postgres tables with arrays

Screenshots
Error Message

Desktop (please complete the following information):

  • OS: Debian 13
  • Browser: Zen 1.14b (Firefox 140.0.2) (64-bit)

Additional context
Imported code:

CREATE TABLE sal_emp (
    name            text,
    pay_by_quarter  integer[],
    schedule        text[][]
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions