Skip to content
This repository was archived by the owner on Aug 14, 2023. It is now read-only.
This repository was archived by the owner on Aug 14, 2023. It is now read-only.

Incorrect DDL order for event triggers #14

Description

@soedirgo

Bug report

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

  1. Create a directory named repro
  2. Create docker-compose.yml
services:
  db1:
    image: supabase/postgres
    ports:
      - 5432:5432
    environment:
      POSTGRES_PASSWORD: postgres
  db2:
    image: supabase/postgres
    ports:
      - 5433:5432
    environment:
      POSTGRES_PASSWORD: postgres
  1. Run the following on db1:
CREATE FUNCTION f() RETURNS event_trigger LANGUAGE plpgsql AS $$ BEGIN END; $$;
CREATE EVENT TRIGGER et ON DDL_COMMAND_END
    WHEN TAG IN ('CREATE EXTENSION')
    EXECUTE PROCEDURE f();
  1. Run:
docker run --rm -it --network repro_default supabase/pgadmin-schema-diff 'postgresql://postgres:postgres@db1/postgres' 'postgresql://postgres:postgres@db2/postgres'
  1. Run the resulting SQL on db2

Expected behavior

The SQL runs successfully.

Activity

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

    bugSomething isn't workingupstreamProblem with pgadmin4 itself

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions