Flavio Henrique Araque Gurgel <fha...@gmail.com> writes:
> It seems that naming prepared statements is limited to 63 characters as per
> https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

Yeah, just like every other SQL identifier in Postgres...

> The dangerous situation is that PostgreSQL seems to ignore rigthmost
> overflowed characters silently.

It's hardly silent:

regression=# prepare 
foo1234567890123456789012345678901234567890123456789012345678901234567890 as 
select 1;
NOTICE:  identifier 
"foo1234567890123456789012345678901234567890123456789012345678901234567890" 
will be truncated to 
"foo123456789012345678901234567890123456789012345678901234567890"
PREPARE

> Wouldn't it be good to include that information on the prepared statement
> doc page?

You could as well argue that every single page that describes creating
any sort of object ought to repeat this information.  I doubt that people
would find that to be an improvement.

                        regards, tom lane

Reply via email to