cds-dbm
cds-dbm copied to clipboard
Table names max length
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
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 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.