pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
identifier will be truncated
3+ messages / 3 participants
[nested] [flat]

* identifier will be truncated
@ 2021-02-08 16:39 Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>
  2021-02-08 16:41 ` Re: identifier will be truncated Adrian Klaver <adrian.klaver@aklaver.com>
  2021-02-08 16:45 ` Re: identifier will be truncated Paul Förster <paul.foerster@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Joao Miguel Ferreira @ 2021-02-08 16:39 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

Hello all,

I'm running unit/integration tests on a pg based application. I recently
started getting the following indication on the test suite pg client:

NOTICE:  identifier
"y1972_1004_vat_periodic_declaration_suppliers_lines_dupl_c24_liq" will be
truncated to
"y1972_1004_vat_periodic_declaration_suppliers_lines_dupl_c24_li"

Please advise on what I should do about it or if this might be a potential
problem that I should address.

Thank you
Joao

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: identifier will be truncated
  2021-02-08 16:39 identifier will be truncated Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>
@ 2021-02-08 16:41 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Adrian Klaver @ 2021-02-08 16:41 UTC (permalink / raw)
  To: Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>; pgsql-general <pgsql-general@lists.postgresql.org>

On 2/8/21 8:39 AM, Joao Miguel Ferreira wrote:
> Hello all,
> 
> I'm running unit/integration tests on a pg based application. I recently 
> started getting the following indication on the test suite pg client:
> 
> NOTICE:  identifier 
> "y1972_1004_vat_periodic_declaration_suppliers_lines_dupl_c24_liq" will 
> be truncated to 
> "y1972_1004_vat_periodic_declaration_suppliers_lines_dupl_c24_li"
> 
> Please advise on what I should do about it or if this might be a 
> potential problem that I should address.

https://www.postgresql.org/docs/12/sql-syntax-lexical.html

"The system uses no more than NAMEDATALEN-1 bytes of an identifier; 
longer names can be written in commands, but they will be truncated. By 
default, NAMEDATALEN is 64 so the maximum identifier length is 63 bytes. 
If this limit is problematic, it can be raised by changing the 
NAMEDATALEN constant in src/include/pg_config_manual.h."

> 
> Thank you
> Joao
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: identifier will be truncated
  2021-02-08 16:39 identifier will be truncated Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>
@ 2021-02-08 16:45 ` Paul Förster <paul.foerster@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Paul Förster @ 2021-02-08 16:45 UTC (permalink / raw)
  To: Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

Hi Joao,

> On 08. Feb, 2021, at 17:39, Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com> wrote:
> 
> NOTICE:  identifier "y1972_1004_vat_periodic_declaration_suppliers_lines_dupl_c24_liq" will be truncated to "y1972_1004_vat_periodic_declaration_suppliers_lines_dupl_c24_li"
> 
> Please advise on what I should do about it or if this might be a potential problem that I should address.

this is an indication that your object name is longer than 63 characters, which is a hard coded limit.

You have two options:

a) compile the PostgreSQL software from source and increase that limit (which I wouldn't recommend), or

b) use shorter object names (table-, view-, sequence-, column-, whatever names) with a maximum length of 63 characters.

Cheers,
Paul




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-02-08 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 16:39 identifier will be truncated Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>
2021-02-08 16:41 ` Adrian Klaver <adrian.klaver@aklaver.com>
2021-02-08 16:45 ` Paul Förster <paul.foerster@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox