| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Flavio Henrique Araque Gurgel <fhagur(at)gmail(dot)com> |
| Cc: | pgsql-docs(at)postgresql(dot)org |
| Subject: | Re: Limitation of prepared statement name |
| Date: | 2018-08-28 16:21:15 |
| Message-ID: | 28416.1535473275@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
Flavio Henrique Araque Gurgel <fhagur(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2018-08-28 16:34:08 | retroactive pg10 relnotes: sequence changes |
| Previous Message | David G. Johnston | 2018-08-28 15:56:08 | Re: Error when following a documentation |