Re: Adding a pg_get_owned_sequence function?

Поиск
Список
Период
Сортировка
От Shubham Khanna
Тема Re: Adding a pg_get_owned_sequence function?
Дата
Msg-id CAHv8RjLhpd_QmAb1SQ4Rh=4XaWL3TWxRwwudQdRjvQBw_GOF0A@mail.gmail.com
обсуждение исходный текст
Ответ на Adding a pg_get_owned_sequence function?  (Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>)
Список pgsql-hackers
On Fri, Dec 8, 2023 at 3:43 PM Dagfinn Ilmari Mannsåker
<ilmari@ilmari.org> wrote:
>
> Hi hackers,
>
> I've always been annoyed by the fact that pg_get_serial_sequence takes
> the table and returns the sequence as strings rather than regclass. And
> since identity columns were added, the name is misleading as well (which
> is even acknowledged in the docs, together with a suggestion for a
> better name).
>
> So, instead of making excuses in the documentation, I thought why not
> add a new function which addresses all of these issues, and document the
> old one as a backward-compatibilty wrapper?
>
> Please see the attached patch for my stab at this.
>

I reviewed the Patch and the compilation looks fine. I tested various
scenarios and did not find any issues.  Also I did RUN 'make check'
and 'make check-world' and all the test cases passed successfully. I
figured out a small typo please have a look at it:-

This is the name the docs say `pg_get_serial_sequence` sholud have
had, and gives us the opportunity to change the return and table
argument types to `regclass` and the column argument to `name`,
instead of using `text` everywhere.  This matches what's in catalogs,
and requires less explaining than the rules for
`pg_get_serial_sequence`.

Here 'sholud' have been 'should'.

Thanks and Regards,
Shubham Khanna.



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Test 002_pg_upgrade fails with olddump on Windows
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCH] minor reloption regression tests improvement