Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fugk8-0000HJ-Hx for pgsql-docs@arkaria.postgresql.org; Tue, 28 Aug 2018 16:21:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fugk6-0003Ye-GH for pgsql-docs@arkaria.postgresql.org; Tue, 28 Aug 2018 16:21:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fugk5-0003YJ-Vc for pgsql-docs@lists.postgresql.org; Tue, 28 Aug 2018 16:21:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fugk2-000286-Ms for pgsql-docs@postgresql.org; Tue, 28 Aug 2018 16:21:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7SGLFMp028417; Tue, 28 Aug 2018 12:21:15 -0400 From: Tom Lane To: Flavio Henrique Araque Gurgel cc: pgsql-docs@postgresql.org Subject: Re: Limitation of prepared statement name In-reply-to: References: Comments: In-reply-to Flavio Henrique Araque Gurgel message dated "Tue, 28 Aug 2018 16:26:30 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28415.1535473275.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 28 Aug 2018 12:21:15 -0400 Message-ID: <28416.1535473275@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Flavio Henrique Araque Gurgel 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#S= QL-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=3D# prepare foo123456789012345678901234567890123456789012345678= 9012345678901234567890 as select 1; NOTICE: identifier "foo12345678901234567890123456789012345678901234567890= 12345678901234567890" will be truncated to "foo123456789012345678901234567= 890123456789012345678901234567890" PREPARE > Wouldn't it be good to include that information on the prepared statemen= t > 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