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

Incorrect DDL order for event triggers #14

Open
soedirgo opened this issue Sep 17, 2021 · 2 comments
Open

Incorrect DDL order for event triggers #14

soedirgo opened this issue Sep 17, 2021 · 2 comments
Labels
bug Something isn't working upstream Problem with pgadmin4 itself

Comments

@soedirgo
Copy link
Member

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.

@soedirgo soedirgo added the bug Something isn't working label Sep 17, 2021
@soedirgo
Copy link
Member Author

This may have been fixed upstream, so I'd try resolving #12 first.

@soedirgo
Copy link
Member Author

soedirgo commented Oct 6, 2021

#12 doesn't nail it - similar problem to #25.

@soedirgo soedirgo added the upstream Problem with pgadmin4 itself label Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working upstream Problem with pgadmin4 itself
Projects
None yet
Development

No branches or pull requests

1 participant