Error when creating a table with a long name through CreateTable process

Environment

None

testing discovered

Activity

Carlos Ruiz 
March 12, 2024 at 10:04 AM
(edited)

I think we don’t need a new ticket as this is still on the scope of the initial problem, or you can change/expand a bit the subject if you prefer.

The 60/63 rule comes from the _ID and _UU suffixes for column, so a table in principle must have the max length of a column minus three as at least the _UU column is mandatory

Nicolas Micoud 
March 12, 2024 at 7:33 AM

Hi,
I didn’t make any change on this part.
I’m trying to still use the 30 characters limit to avoid having so long object names.

​​
But after all, maybe this ticket can be closed and replaced by a new one that will harmonize all DB object length, and set maximum to 60 (maybe is better to have 60 everywhere, that will avoid to manage exception?)


Carlos Ruiz 
March 11, 2024 at 3:15 PM

Ah OK, we can assume if the tablename length <= 27 then is just _UU suffix and we don’t need to look for the column.

When tablename length > 27 then we check for an existing column and fallback to _UU suffix if there is not any.

Heng Sin Low 
March 11, 2024 at 2:48 PM

If table exists, we just need to check 2 possibilities, it must be either 60+3 or 27+3.

Since table and column info is cache, I doubt it will add much performance overhead.

Carlos Ruiz 
March 11, 2024 at 2:37 PM

So, your idea would be like:

  • if the table exists, search for the column with type UUID

  • if it doesn’t exist, return the columnname + “_UU” suffix

right?

Maybe for performance reasons we could turn on the need to search for column using a SysConfig.

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created March 8, 2024 at 6:27 PM
Updated June 1, 2024 at 3:18 PM
Resolved April 4, 2024 at 2:16 PM