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

Duplicate sequences for identity columns #25

Open
soedirgo opened this issue Oct 6, 2021 · 0 comments
Open

Duplicate sequences for identity columns #25

soedirgo opened this issue Oct 6, 2021 · 0 comments
Labels
bug Something isn't working upstream Problem with pgadmin4 itself

Comments

@soedirgo
Copy link
Member

soedirgo commented Oct 6, 2021

Bug report

To Reproduce

On source:

create table t(id int8 generated by default as identity);

Diff with target:

CREATE SEQUENCE IF NOT EXISTS public.t_id_seq
    INCREMENT 1
    START 1
    MINVALUE 1
    MAXVALUE 9223372036854775807
    CACHE 1;

ALTER SEQUENCE public.t_id_seq
    OWNER TO postgres;
CREATE TABLE IF NOT EXISTS public.t
(
    id bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 )
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.t
    OWNER to postgres;

\ds after running the above on target:

postgres=# \ds
            List of relations
 Schema |   Name    |   Type   |  Owner   
--------+-----------+----------+----------
 public | t_id_seq  | sequence | postgres
 public | t_id_seq1 | sequence | postgres
(2 rows)

Expected behavior

The CREATE SEQUENCE ... part shouldn't exist.

@soedirgo soedirgo added bug Something isn't working upstream Problem with pgadmin4 itself labels 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