| From: | Mario González Troncoso <gonzalemario(at)gmail(dot)com> |
|---|---|
| To: | Japin Li <japinli(at)hotmail(dot)com> |
| Cc: | li carol <carol(dot)li2025(at)outlook(dot)com>, Bryan Green <dbryan(dot)green(at)gmail(dot)com>, Quan Zongliang <quanzongliang(at)yeah(dot)net>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Add pg_get_role_ddl() functions for role recreation |
| Date: | 2026-01-08 12:19:53 |
| Message-ID: | CAFsReFVAznkE-1S1QBnRuXKM4MR4ONSRbt-A05Q1E7-xSazdBA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 7 Jan 2026 at 22:40, Japin Li <japinli(at)hotmail(dot)com> wrote:
>
> >
> > Is that what you mean by "remove the variable and hard-code"?
> >
> > @@ -578,7 +578,6 @@ pg_get_role_ddl_internal(Oid roleid)
> > - const char *separator = " ";
> >
> > tuple = SearchSysCache1(AUTHOID, ObjectIdGetDatum(roleid));
> > if (!HeapTupleIsValid(tuple))
> > @@ -605,34 +604,34 @@ pg_get_role_ddl_internal(Oid roleid)
> > * you'd typically write them in a CREATE ROLE command, though any order
> > * is actually acceptable to the parser.
> > */
> >
> >
> > - appendStringInfo(&buf, "%s%s", separator,
> > - roleform->rolcanlogin ? "LOGIN" : "NOLOGIN");
> > -
> > - appendStringInfo(&buf, "%s%s", separator,
> > + appendStringInfo(&buf, " %s",
> >
> > The lines above are a snippet of the latest commit `WIP: removing
> > "separator"` on https://cirrus-ci.com/build/4621719253549056
> > Would you be able to see the whole change over there? If that's what
> > you mean, I'll squash afterwards and attach a new patch version to
> > this thread.
> >
>
> Yeah, you read my mind.
Cool. I rebased this morning and it passed just fine.
>
> --
> Regards,
> Japin Li
> ChengDu WenWu Information Technology Co., Ltd.
--
Mario Gonzalez
EDB: https://www.enterprisedb.com
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Add-functions-to-generate-DDL-for-recreating-role.patch | text/x-patch | 23.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jelte Fennema-Nio | 2026-01-08 12:23:53 | ci: Add MTEST_SUITES for optional test tailoring |
| Previous Message | myzhen | 2026-01-08 12:03:41 | Re:Re: Re: Fix incorrect column name in error message for range partition bound check |