From: | Flavio Henrique Araque Gurgel <fhagur(at)gmail(dot)com> |
---|---|
To: | pgsql-docs(at)postgresql(dot)org |
Subject: | Limitation of prepared statement name |
Date: | 2018-08-28 14:26:30 |
Message-ID: | CAGHTAeOxqeojgvWEuciRvq1xbZYHKK6mGzs=g2rQ8upM3mwVWA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Hello all
I just found a limitation in prepared statements names that I didn't know
before and can lead applications to be difficult to debug.
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
However, the documentation for PREPARE says nothing about it
https://www.postgresql.org/docs/10/static/sql-prepare.html
The dangerous situation is that PostgreSQL seems to ignore rigthmost
overflowed characters silently. If we try to prepare another statement with
the same 63 leftmost characters as the first one, we get an error of
duplicate prepared statement name.
Wouldn't it be good to include that information on the prepared statement
doc page? Maybe I should notify this as a general bug so we treat this at
the code level.
Best,
Flavio Gurgel
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2018-08-28 15:13:51 | Error when following a documentation |
Previous Message | Justin Pryzby | 2018-08-27 16:23:37 | remove duplicated words in comments .. across lines |