postgresql/src/backend
Nathan Bossart 562bee0fc1 Don't truncate database and user names in startup packets.
Unlike commands such as CREATE DATABASE, ProcessStartupPacket()
does not perform multibyte-aware truncation of overlength names.
This means that connection attempts might fail even if the user
provides the same overlength names that were used in CREATE
DATABASE, CREATE ROLE, etc.  Ideally, we'd do the same multibyte-
aware truncation in both code paths, but it doesn't seem worth the
added complexity of trying to discover the encoding of the names.
Instead, let's simply skip truncating the names in the startup
packet and let the user/database lookup fail later on.  With this
change, users must provide the exact names stored in the catalogs,
even if the names were truncated.

This reverts commit d18c1d1f51.

Author: Bertrand Drouvot
Reviewed-by: Kyotaro Horiguchi, Tom Lane
Discussion: https://postgr.es/m/07436793-1426-29b2-f924-db7422a05fb7%40gmail.com
2023-07-03 13:18:05 -07:00
..
access Consider fillfactor when estimating relation size 2023-07-03 18:55:31 +02:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
bootstrap Fix CREATE INDEX progress reporting for multi-level partitioning. 2023-03-25 15:34:03 -04:00
catalog Use named captures in Catalog::ParseHeader() 2023-06-30 09:16:27 +09:00
commands Fix code indentation violations 2023-07-03 12:47:49 +02:00
executor Fix memory leak in Incremental Sort rescans 2023-07-02 20:03:30 +02:00
foreign Expand some more uses of "deleg" to "delegation" or "delegated". 2023-05-21 10:55:18 -04:00
jit Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
lib Fix ILIST_DEBUG build 2023-01-18 10:26:15 -08:00
libpq Remove support for OpenSSL 1.0.1 2023-07-03 13:20:27 +09:00
main Remove obsolete defense against strxfrm() bugs. 2023-04-20 13:20:14 +12:00
nodes Remove inappropriate raw_expression_tree_walker() code 2023-06-29 10:34:53 +02:00
optimizer Remove redundant PARTITION BY columns from WindowClauses 2023-07-03 12:49:43 +12:00
parser Remove dependency to query text in JumbleQuery() 2023-06-28 08:59:36 +09:00
partitioning Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
po Translation updates 2023-06-26 12:02:02 +02:00
port Update copyright for 2023 2023-01-02 15:00:37 -05:00
postmaster Don't truncate database and user names in startup packets. 2023-07-03 13:18:05 -07:00
regex Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
replication Remove redundant check for fast_forward. 2023-06-30 18:31:10 +03:00
rewrite A minor simplification for List manipulation 2023-07-03 11:39:03 +02:00
snowball Fix the install rule for snowball_create.sql. 2023-05-23 11:15:57 -04:00
statistics Take pg_attribute out of VacAttrStats 2023-07-03 07:18:57 +02:00
storage Refactor some code related to wait events "BufferPin" and "Extension" 2023-07-03 11:01:02 +09:00
tcop Handle logical slot conflicts on standby 2023-04-08 00:05:44 -07:00
tsearch Take pg_attribute out of VacAttrStats 2023-07-03 07:18:57 +02:00
utils Take pg_attribute out of VacAttrStats 2023-07-03 07:18:57 +02:00
.gitignore
Makefile Give postgres.exe the icon of other executables. 2023-06-12 07:40:38 -07:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
meson.build Add win32ver data to meson-built postgres.exe. 2023-06-12 07:40:38 -07:00
nls.mk Add missing gettext triggers 2023-05-10 13:51:51 +02:00