Add NAMEDATALEN to PG_CONFIG?

Started by Andy Johnsonalmost 9 years ago3 messagesgeneral
Jump to latest
#1Andy Johnson
andy@asjohnson.com

Is there a way to find NAMEDATALEN in a
database, other than looking at the
source? If not could it be added to the
PG_CONFIG eventually?

Andy Johnson

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Andy Johnson (#1)
Re: Add NAMEDATALEN to PG_CONFIG?

On 05/15/2017 04:27 PM, Andy Johnson wrote:

Is there a way to find NAMEDATALEN in a database, other than looking at
the source? If not could it be added to the PG_CONFIG eventually?

Andy Johnson

https://www.postgresql.org/docs/9.6/static/runtime-config-preset.html

"max_identifier_length (integer)

Reports the maximum identifier length. It is determined as one less
than the value of NAMEDATALEN when building the server. The default
value of NAMEDATALEN is 64; therefore the default max_identifier_length
is 63 bytes, which can be less than 63 characters when using multibyte
encodings.
"

So:

production=# show max_identifier_length ;
max_identifier_length
-----------------------
63

--
Adrian Klaver
adrian.klaver@aklaver.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andy Johnson (#1)
Re: Add NAMEDATALEN to PG_CONFIG?

Andy Johnson <andy@asjohnson.com> writes:

Is there a way to find NAMEDATALEN in a
database, other than looking at the
source?

select typlen from pg_type where typname = 'name';

If not could it be added to the
PG_CONFIG eventually?

Seems like it would only make sense to do that if we supported
configuring NAMEDATALEN, which we don't really: you have to
manually edit pg_config_manual.h, and how well the result works
is on your own head.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general