Thread: table name size

table name size

From
Sridhar N Bamandlapally
Date:
Hi

how to create table name with size, the limitation we are facing is 63 length

these are dynamic tables created from application

issue is: 
we cannot suggest/tell client to change NAMEDATALEN constant in src/include/pg_config_manual.h

do we have any other option, 

please

Thanks
Sridhar
OpenText

Re: table name size

From
"David G. Johnston"
Date:
On Mon, Jun 13, 2016 at 7:21 AM, Sridhar N Bamandlapally <sridhar.bn1@gmail.com> wrote:
Hi

how to create table name with size, the limitation we are facing is 63 length

these are dynamic tables created from application

issue is: 
we cannot suggest/tell client to change NAMEDATALEN constant in src/include/pg_config_manual.h

do we have any other option, 


​Ensure that the application's algorithm for generating names doesn't generate names that exceed 63 characters.​

​If you're asking if there a runtime setting to control this the answer is no.​

​David J.​

Re: table name size

From
Sridhar N Bamandlapally
Date:
Hi

Is there any specific reason not releasing any version with "NAMEDATALEN 255" in file src/include/pg_config_manual.h ?

this will really nice if we do with "NAMEDATALEN 255" src/include/pg_config_manual.h

Please

Thanks
Sridhar
OpenText



On Mon, Jun 13, 2016 at 5:40 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Mon, Jun 13, 2016 at 7:21 AM, Sridhar N Bamandlapally <sridhar.bn1@gmail.com> wrote:
Hi

how to create table name with size, the limitation we are facing is 63 length

these are dynamic tables created from application

issue is: 
we cannot suggest/tell client to change NAMEDATALEN constant in src/include/pg_config_manual.h

do we have any other option, 


​Ensure that the application's algorithm for generating names doesn't generate names that exceed 63 characters.​

​If you're asking if there a runtime setting to control this the answer is no.​

​David J.​


Re: table name size

From
Tom Lane
Date:
Sridhar N Bamandlapally <sridhar.bn1@gmail.com> writes:
> Is there any specific reason not releasing any version with "NAMEDATALEN 255"
> in file src/include/pg_config_manual.h ?

It would bloat the system catalogs by a rather substantial amount, as well
as in-memory images of those catalogs (catcaches).  Seeing that the field
demand for this is next to nil, we're not very likely to do it just for
nominal standards compliance.  But you're free to build your own copy that
way if you like --- that's why it's configurable.

BTW, you might as well set it to 256 not 255: alignment considerations
mean that the odd byte would just be wasted in most or all of the
catalogs.

            regards, tom lane