Re: [HACKERS] Re: [SQL] Column name's length - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: [SQL] Column name's length
Date
Msg-id 25106.928532768@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [SQL] Column name's length  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
>> Still, I wonder why OIDNAMELEN isn't just defined as
>> (NAMEDATALEN+sizeof(Oid)) rather than putting a comment to that effect.
>> I will check the uses and see if that is a safe change or not.

> Yes, probably should be changed.  The old code did some fancy sed with
> it, so maybe it had to be a real number back then, or perhaps initdb
> pulls it from the file.  Not sure.

There was indeed a script pulling it from the file ... but it turns out
the value wasn't actually being *used* anywhere!  So I just removed
OIDNAMELEN entirely.

Peter Mount pointed out that the Java interface code has 32 hardwired as
a constant for name length, and there may be similar problems in other
non-C interfaces that can't conveniently use the NAMEDATALEN constant
from postgres_ext.h.  Another problem is that some of psql's formats for
system table display have hardwired column widths.  So there is still
work to do if you want to alter NAMEDATALEN.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Hub.Org News Admin"
Date:
Subject: ...
Next
From: Massimo Dal Zotto
Date:
Subject: contrib code for 6.5