Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Table names max length #180

Open
sedacrivity opened this issue Apr 7, 2022 · 2 comments
Open

Table names max length #180

sedacrivity opened this issue Apr 7, 2022 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@sedacrivity
Copy link

Hi,

It seems that the max length of a table name in Postgresql is 63 bytes.

I am getting errors now during the initial deploy as it is trying to create views that already exist - because the names get truncated at 63 chars and are therefore similar.

I am not using a fancy long name but the names are that long due to the pattern 'service name_view' ( which seems logical ).

eg

ApiPublicProfilesManagersDataManagementService_DataCampaignsSteps ApiPublicProfilesManagersDataManagementService_DataCampaignsStepsStats

both end up being

apipublicprofilesmanagersdatamanagementservice_datacampaignsste

Hence the error:

ERROR: relation "apipublicprofilesmanagersdatamanagementservice_datacampaignsste" already exists STATEMENT: CREATE VIEW ApiPublicProfilesManagersDataManagementService_DataCampaignsStepsStats AS SELECT

So it is not really an issue persé but something to be aware off ...

Thanks,

Steven

@mikezaschka
Copy link
Owner

You are right. Namespaces should be kept short to have enough characters available for the respective tables/views.
I am going to add this to the readme.

@mikezaschka mikezaschka added the documentation Improvements or additions to documentation label Apr 7, 2022
@mikezaschka mikezaschka self-assigned this Apr 7, 2022
@sedacrivity
Copy link
Author

sedacrivity commented Apr 7, 2022

@mikezaschka Great !

In this particular case it is the actual service name which is ( in retrorespect ) hmmm rather unnecessary big ...

service ApiPublicProfilesManagersDataManagementService

But indeed namespace or servicename are taken into account so it can add up quickly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants