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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Zalman Stern <zalman(at)netcom(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [SQL] Column name's length
Date: 1999-06-04 21:46:08
Message-ID: 25106.928532768@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Massimo Dal Zotto 1999-06-04 21:46:38 contrib code for 6.5
Previous Message Massimo Dal Zotto 1999-06-04 21:37:53 bugs in version 6.5