Re: pgsql: Clean up role created in new subscription test.

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: pgsql: Clean up role created in new subscription test.
Дата
Msg-id 2A3A15B2-FD71-4767-9A01-4C2C9264F960@yesql.se
обсуждение исходный текст
Ответ на Re: pgsql: Clean up role created in new subscription test.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> On 30 Mar 2023, at 22:29, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Daniel Gustafsson <daniel@yesql.se> writes:
>>> On 30 Mar 2023, at 20:44, Tom Lane <tgl@sss.pgh.pa.us> wrote:

>>> Another idea could be for pg_regress to enforce that "select count(*)
>>> from pg_roles" gives the same answer before and after the test run.
>
>> That wouldn't prevent the contents of pg_roles to have changed though, so there
>> is a (slim) false positive risk with that no?
>
> Well, we could do "select rolname from pg_roles order by 1" and
> actually compare the results of the two selects.  That might be
> advisable anyway, in order to produce a complaint with useful
> detail when there is something wrong.

I can see the value in doing something like this to keep us honest.

--
Daniel Gustafsson




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Clean up role created in new subscription test.
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: Thoughts on using Text::Template for our autogenerated code?