Skip to content

[BUG]Some keywords that are not recognized when importing SQL source code (PG). #540

Open

Description

@mjmjmmmjjj

SQL Import Issues
When importing the provided SQL source code via the menu, two issues were encountered:

Unrecognized Auto-Incrementing Sequence: The GENERATED BY DEFAULT AS IDENTITY clause for the auto-incrementing sequence was not recognized.

Unidentifiable Enum Types: The enumeration types, such as ENUM_LOGS_ENTRY_CATEGORY, could not be created, leading to them being unrecognized.

CREATE TABLE "t_logs" (

"log_id" INTEGER NOT NULL UNIQUE GENERATED BY DEFAULT AS IDENTITY,

"pat_id" VARCHAR(50) NOT NULL,

"entry_category" ENUM_LOGS_ENTRY_CATEGORY NOT NULL,

"operation_type" ENUM_LOGS_OPER_TYPE NOT NULL,

"entry_count" INTEGER NOT NULL,

"created_at" TIMESTAMP NOT NULL DEFAULT NOW(),

PRIMARY KEY("log_id")

);

Activity

  1. 1ilit commented on Jul 29, 2025

    @1ilit
    Member

    can you also add the definitions of the enums that didnt get created

  2. jessekoester commented on Oct 4, 2025

    @jessekoester

    I would like to take this issue is it available to work on?

  3. Yaksinikos commented on May 19, 2026

    @Yaksinikos

    PostgreSQL somewhy exports empty enums as CREATE TYPE "role_t" AS ENUM (); what implicates failing import later.
    See

    `CREATE TYPE "role_t" AS ENUM ();
    
    CREATE TABLE IF NOT EXISTS "user_account_permission" (
    	"user_id" smallint NOT NULL,
    	"account_id" smallint NOT NULL,
    	"role" role_t
    );`
    

    First it fails to import with following error: can't access property "parentheses", Jr is null.
    I guess those issues are related.

  4. added 2 commits that reference this issue on May 19, 2026
  5. Yaksinikos commented on May 19, 2026

    @Yaksinikos

    Just tested my fixes, also added comment ignore behaviour for PG - seems to work running on my vite dev instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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