From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: d.koval@postgrespro.ru
Subject: Re: Postgres do not allow to create many tables with more than 63-symbols prefix
Date: Thu, 23 Jun 2022 11:03:33 +0900
Message-ID: <CAD21AoC5wt6iCFK5uMRTTYT3be09RWi9a3YduKXUqsFbTKby_Q@mail.gmail.com> (raw)
In-Reply-To: <121e286f-3796-c9d7-9eab-6fb8e0b9c701@postgrespro.ru>
References: <121e286f-3796-c9d7-9eab-6fb8e0b9c701@postgrespro.ru>
Hi,
On Sat, Jun 4, 2022 at 4:03 AM Andrey Lepikhov
<a.lepikhov@postgrespro.ru> wrote:
>
> According to subj you can try to create many tables (induced by the case
> of partitioned table) with long prefix - see 6727v.sql for reproduction.
> But now it's impossible because of logic of the makeUniqueTypeName()
> routine.
> You get the error:
> ERROR: could not form array type name for type ...
>
> It is very corner case, of course. But solution is easy and short. So,
> why not to fix? - See the patch in attachment.
While this seems to be a good improvement, I think it's not a bug.
Probably we cannot backpatch it as it will end up having type names
defined by different naming rules. I'd suggest discussing it on
-hackers.
Regarding the patch, I think we can merge makeUniqueTypeName() to
makeArrayTypeName() as there is no caller of makeUniqueTypeName() who
pass tryOriginal = true. Also looking at other ChooseXXXName()
functions, we don't care about integer overflow. Is it better to make
it consistent with them?
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: sawada.mshk@gmail.com, a.lepikhov@postgrespro.ru, d.koval@postgrespro.ru
Subject: Re: Postgres do not allow to create many tables with more than 63-symbols prefix
In-Reply-To: <CAD21AoC5wt6iCFK5uMRTTYT3be09RWi9a3YduKXUqsFbTKby_Q@mail.gmail.com>
References: <121e286f-3796-c9d7-9eab-6fb8e0b9c701@postgrespro.ru> <CAD21AoC5wt6iCFK5uMRTTYT3be09RWi9a3YduKXUqsFbTKby_Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox