From: Etsuro Fujita Date: Sun, 14 Jun 2026 07:00:00 +0000 (+0900) Subject: Fix oversight in commit aa1f93a33. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0131e8fc508ff8e10a6797bfe8043a0b9d34b30b;p=thirdparty%2Fpostgresql.git Fix oversight in commit aa1f93a33. Since the remote column names of a foreign table could be longer than NAMEDATALEN, remattrmap_cmp(), which compares such column names, should have used strcmp(), not strncmp() with n=NAMEDATALEN. Author: Chao Li Reviewed-by: Etsuro Fujita Discussion: https://postgr.es/m/81D981EB-ECC1-495D-8EAC-5CFB67B2CF77%40gmail.com --- diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 0a589f8db74..6dbae583ecc 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -6024,7 +6024,7 @@ remattrmap_cmp(const void *v1, const void *v2) const RemoteAttributeMapping *r1 = v1; const RemoteAttributeMapping *r2 = v2; - return strncmp(r1->remote_attname, r2->remote_attname, NAMEDATALEN); + return strcmp(r1->remote_attname, r2->remote_attname); } /*