Long table names
Hi there.
I remember someone talking about compiling pgsql so that it could use
table names longer than 32 bytes, but that it would require some
changes in the source code. Could anyone tell me what changes these
are, and how safe it would be to do it (that is, should I assume that
I could just compile a newer version making the same changes to the
sources, and have anyone experienced anything broken using the longer
table names)???
Yours faithfully.
Finn Kettner.
PS. The main reasong for the longer table names is not the tables
themself, but the indexes etc. that are constructed automatically
using e.g. serial fields.
"Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu> writes:
As you can see, the table name has been truncated to make the whole
thing fit into 32 characters. You'd need to check the source to see the
exact algorithm: I'm not sure if it starts trimming on the field name,
ever.
Right now, the algorithm is to preferentially truncate the longer name
component (table name or column name). There was some talk of adding
quasi-random hash characters to reduce the probability of name
collisions, but it's not been done.
Anyway, to answer the question Finn asked,
I remember someone talking about compiling pgsql so that it could use
table names longer than 32 bytes, but that it would require some
changes in the source code. Could anyone tell me what changes these
are,
In theory you should only have to change NAMEDATALEN, rebuild, and
initdb. I think someone reported a few months on actually trying
this experiment (probably, around the same time we decided to put in
the name-truncation logic); check the pghackers archives for details.
regards, tom lane
Import Notes
Reply to msg id not found: YourmessageofMon16Aug1999132952-050019990816132951.B29007@wallace.ece.rice.edu | Resolved by subject fallback