Re: possible issue with array type created for every heap relation composite type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jimmy Yih <jyih(at)pivotal(dot)io>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: possible issue with array type created for every heap relation composite type
Date: 2018-07-10 22:53:03
Message-ID: 5129.1531263183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jimmy Yih <jyih(at)pivotal(dot)io> writes:
> The possible issue I would like to note is related to how the array type is
> named in makeArrayTypeName() function. The composite type will take the
> heap relation's relname as its typname and the array type will usually be
> named with an underscore prepended (after first attempting to use the
> relname and hitting typname collision with the composite type). If the
> typname with the underscore prepended is already taken, the logic is to
> continue prepending underscores until there are no typname collisions
> (truncating the end of the typname if typname gets past NAMEDATALEN of
> 64). It is possible that enough heap relations with similar relnames could
> cause more and more typname collisions until you end up with typnames that
> primarily consist of underscores or not being able to construct a typname
> because we have reached a typname consisting of all underscores (which can
> cause table creation failure).

We've never heard a field report of this happening, so I'm not terribly
concerned about it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-07-10 22:58:05 Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?
Previous Message Alvaro Herrera 2018-07-10 22:44:21 Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?