From: | Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com> |
---|---|
To: | Regina Obe <lr(at)pcorp(dot)us> |
Cc: | pgadmin-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Explicitly setting sequence next value, removes ownership of table of a serial |
Date: | 2023-02-10 04:55:26 |
Message-ID: | CAM9w-_nqxT8Bts9R3i4=u9yhPJbGeut9U_43BfUM5K-8NyDM2A@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi Regina,
The issue looks like - https://github.com/pgadmin-org/pgadmin4/issues/5810
On Fri, Feb 10, 2023 at 4:17 AM Regina Obe <lr(at)pcorp(dot)us> wrote:
> I noticed something which might be intentional, but seems odd.
>
> If I do something like:
>
> CREATE TABLE test(id serial, name text);
>
> And then I use the pgAdmin UI to edit the current value of the sequence.
> I notice it does this:
>
> ALTER SEQUENCE IF EXISTS public.test_id_seq OWNED BY NONE;
> SELECT setval('public.test_id_seq', 2, true);
>
>
> So then dropping the table, will not drop the sequence.
>
> If I create a table with the generated syntax:
>
> CREATE TABLE test(id integer GENERATED BY DEFAULT AS IDENTITY, name text);
>
> Then go edit, it doesn't try to drop the ownership, just does this
>
> SELECT setval('public.test_id_seq', 2, true);
>
> Is there a reason why pgAdmin drops the ownership?
>
> Thanks,
> Regina
>
>
>
>
>
>
>
>
--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com>
"Don't Complain about Heat, Plant a TREE"
From | Date | Subject | |
---|---|---|---|
Next Message | Akshay Joshi | 2023-02-10 04:56:14 | [pgadmin-org/pgadmin4] 696cb0: Ensure that Grant column permission to a view is v... |
Previous Message | Regina Obe | 2023-02-09 22:47:22 | Explicitly setting sequence next value, removes ownership of table of a serial |