Thread: Extending table name max length

Extending table name max length

From
Tony Griffiths
Date:
Hi,
I need to extend the maximum name length for tables as the databases
that I'm using use automatically generated tables names that can get
quite lengthy. I've managed to find the appropriate header file to set
the max name length so that calls to create tables from the psql command
line work ok (by recompiling from source). But now I need to access
these created tables from within embedded sql.

I had assumed that there would be a single header file that sets the max
name length, but it loos like the esql precompiler didn't pick up the
amended max name length. Can anyone therefore tell me where I should
start to look for the appropriate header file to allow max name lengths
for the esql precompiler to be extended.

Hope this is the correct mailing list for this question.

Many thanks,
--
Tony

---------------------------------
Dr. Tony Griffiths
Research Fellow
Information Management Group,
Department of Computer Science,
The University of Manchester,
Oxford Road,
Manchester M13 9PL,
United Kingdom

Tel. +44 (0) 161 275 6139
Fax +44 (0) 161 275 6236
email tony.griffiths@cs.man.ac.uk
---------------------------------

Re: Extending table name max length

From
Tom Lane
Date:
Tony Griffiths <tony.griffiths@cs.man.ac.uk> writes:
> I had assumed that there would be a single header file that sets the max
> name length, but it loos like the esql precompiler didn't pick up the
> amended max name length.

Did you remember to recompile ecpg?  AFAICT it uses the same NAMEDATALEN
symbol as everyplace else.

In general, when making a system-wide configuration change like that
one, it'd be a good idea to "make clean" at the top level, then do a
full make, make install, initdb cycle.

If you did all that, another possibility is an include file search path
problem: perhaps the ecpg compile picked up a previously-installed
postgres_ext.h with the wrong NAMEDATALEN value.

            regards, tom lane