NAME maximum length in _bytes_

Поиск
Список
Период
Сортировка
Искать

NAME maximum length in _bytes_

От:
Bruce Momjian <bruce@momjian.us>
Дата:
psql \dTS+ shows for data type 'name':

	 pg_catalog | name                | name            | 64   |          | 
        | 63-character type for storing system identifiers

I believe this is really 63 bytes, not characters.  I also see it
mismatched in our docs:

    in the internal system catalogs and is not intended for use by the general user. Its
    length is currently defined as 64 bytes (63 usable characters plus
                                                       ----------
    terminator) but should be referenced using the constant
    NAMEDATALEN in C</> source code.

Should I fix this?

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Re: NAME maximum length in _bytes_

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Tue, May 08, 2012 at 05:13:45PM -0400, Bruce Momjian wrote:
> psql \dTS+ shows for data type 'name':
> 
> 	 pg_catalog | name                | name            | 64   |          | 
>         | 63-character type for storing system identifiers
> 
> I believe this is really 63 bytes, not characters.  I also see it
> mismatched in our docs:
> 
>     in the internal system catalogs and is not intended for use by the general user. Its
>     length is currently defined as 64 bytes (63 usable characters plus
>                                                        ----------
>     terminator) but should be referenced using the constant
>     NAMEDATALEN in C</> source code.
> 
> Should I fix this?

Fix applied;  no catalog bump.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
FAQ