Chris Travers <chris@verkiel.metatrontech.com> writes:
> Out of curiosity, how hard would it be to change the default maximum
> length on the name type in PostgreSQL?
Change NAMEDATALEN in postgres_ext.h, recompile, re-initdb.
I'm not sure why we still define it in postgres_ext.h, because it hasn't
been part of the client API for a long time --- any client code still
depending on it is pretty broken IMHO. There have been periodic
discussions about changing the default value to 128, which is what the
SQL spec says it should be, but we haven't done so because of worries
about bloating the system catalogs.
> There ought to be a simple way to create a PLPGSQL function that would
> do this for you.
People have posted examples a couple of times ... check the archives.
regards, tom lane