"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