Re: [HACKERS] Re: [SQL] Column name's length

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: [SQL] Column name's length
Дата
Msg-id 25106.928532768@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [SQL] Column name's length  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Hub.Org News Admin"
Дата:
Сообщение: ...
Следующее
От: Massimo Dal Zotto
Дата:
Сообщение: contrib code for 6.5