Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFR8r-0056xV-1N for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 06:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFR8p-00BtE4-2C for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 06:32:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFR8p-00BtDw-1C for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 06:32:55 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFR8n-00000002Cuh-1Pdk for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 06:32:54 +0000 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-505a1789a27so25442401cf.3 for ; Tue, 21 Apr 2026 23:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776839573; cv=none; d=google.com; s=arc-20240605; b=fIbCGYfBPKFhJLrpEqrkKJ3HqvieQfsPBHUDrvySEsEiwKo22Ew7WUn1VNtzw98M8h dESds5QnOK5rzYrT7yKBLeRIbL5xFp1DiI5XLftO+CVGJVe1+VnprYMxaFTXaubJ2OXp n0ZaQRJMCr9TWIEdaLOtseTbJU+kJlYuYzmIckmn+ALcJrjv+HRvrV4eyUhQ3qEAD9w9 f4Q6nN2R+b03TScli7EteoWxJ9TVd/suwHXbSqcxUVVv5HM5Gy2TCyp/YuAyRFXTxFUR npceesPsctx6kEYs/LDE3yj4Gr/S8EMVwJ1yZVknXYUx/26l9F1e4F/bsVvBiJQ/B0sT MJ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=GhHIxjEreypsMfwO3sGZZnuOLCpKxceZP7YvGYI+H2E=; fh=Yzml1S0agpw7bTsV77HdHRgvEN5a9YwtPZaN8YChCdA=; b=FyhvwenWCUbuIsMBpoPKaEAZnizxpnCsB5+cCXLTUx8JqjhZpnKJWDTZqkIseRfYr/ hOyfysnc/X4eov8D2mYRScJwEuBu6DabhERL3mh/OB0Vxo7cVjxH1mxTFsvYi4GEU35e LBU5y0vD4ieNdNGFZ6UapOG2v58iJBrW+7Ai9cxWAtN08BcIpDEae3KFI54EezOpjAO+ IfOiy+AJgIysFZK1C5S9glpnom7VcD/1dy0EOeAJoyiIBpXaKaYGFS+mdb2ojy1RtuYs qi/MZ6ljlFQ+sXTn0WNQCq+I06s0mbqaWSjKmvA2qqQTPfyMi/mO5hOWCayEJrYdxGAy 16zA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776839573; x=1777444373; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GhHIxjEreypsMfwO3sGZZnuOLCpKxceZP7YvGYI+H2E=; b=WgwNdUKLXBsLoW7V+tjWEZou4oMhBZJhbF3D5uR4yOv4Ig/oZHBtW1JFhVrmJO1tFj T2rNGgtHj/4+CKp6oNjg7fXktB6hFXI49vfo/buc8VVIa3LodYs6lNgWAPwrp3X3tLd1 UNdy77oVgMqZmOo+478x9lBhiAG5q0t4t9dv5IVKxi0v7pKfUe2Ki6VqUkObeI9SkbWg XVl43kVJif7cQtu5ki7DBEe83wzPSipw+KHnHk65CZIOs/sROpuOob3hLynT7EZdoY4h bo/qczr+HfJUbRZM+c5lxA1NDhUyL13EC/06tsymrxciroeYolLlUQa7r4AsPnVemMlD zttQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776839573; x=1777444373; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GhHIxjEreypsMfwO3sGZZnuOLCpKxceZP7YvGYI+H2E=; b=YEKFIDdT3RA+cIE20KW9w2BwkaBFwV82115fXQ4zFbsNj8t3SAVCBrohlKUT94MKoA 9EZf54dWOgasFeaw1mtmmJ/NS/t/9pIFcWZ3Tz/o9LtzNc2Xgo/v0Y2phV9CQO2zmiU5 NL6G24Fy0a6qrrVXDO7DwQJbRYd4OZvZSZpD5slj9+j89tgp27XNuK20n1E8wlu+QPlO LD/OJN9CDIlZljRVoQURjK5mCv43w2wScJnMZJVd8auUnJFfGBEfEcwEFBhmQhNY6CSn bgWqv56nFeva4hlV/NbGOFIQxSKdyDWNkSjziYPDIb1fkxTIag33473DG+BMprsIH+ZS 2qwA== X-Forwarded-Encrypted: i=1; AFNElJ8un+7KwZWZljCS9jVAFGAq8WVJboVubOgJZ0UULfZlqw3y10W6iVyMjKIB26D3d+PFCYQrVAwL9lVs2Cjw@lists.postgresql.org X-Gm-Message-State: AOJu0YzV5kQnYE1D4aIDo/c6Yj1y++afLSGuC7lIyb3vNQtUAFhWUl+Q a8C+0eK5IawaNlId3mVehMMdUDIClPBUu7lXJ3e77FljKSPL5HTJzDhJ8/TNdjVjlP1/O9GZHhM /HVHOazkwRh2dN+te4o/0Q7/Adf8IEdE= X-Gm-Gg: AeBDieuhSD79U3qmAb5t6jt7Oe/HSpbotDLU3g63sIEPFP6gghrbSA+NeXCbaOUlMYi TQ8j5+qkn53Ggt9raeXsqLhUJofqGqaSQ2qL4jdnRgFGP6Il0eyxHyybnxq8LpzyAQOh3VZZwyy 2PWI2W2icTBZQbIOTQRH1md+/9J5oPlLUhG2ZrxbWhtlb2uUGHOxxL+qu4pKtr3VIjAbkyLb1DE AK6N1aDRcacO55NiO74f1dwiYnWKcM0hIHjOtZ49EYJIOcgf3pVjbm6tAJC7wP2yMZKIOLJ3GoR y/WZ8Q2vU7u4oSydsQ== X-Received: by 2002:a05:622a:5516:b0:50f:b904:457 with SMTP id d75a77b69052e-50fb9040613mr64263491cf.25.1776839572826; Tue, 21 Apr 2026 23:32:52 -0700 (PDT) MIME-Version: 1.0 References: <8B830174-7794-411F-B936-37DDB509EC5D@gmail.com> In-Reply-To: <8B830174-7794-411F-B936-37DDB509EC5D@gmail.com> From: Peter Smith Date: Wed, 22 Apr 2026 16:32:25 +1000 X-Gm-Features: AQROBzCTH6Ed1Nynt-AJPCHXXPfFvQfUkUKVZSTxBuiKqFExeGv0GanwpKVzM50 Message-ID: Subject: Re: Cleanup shadows variable warnings, round 1 To: Chao Li Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , David Rowley , Postgres hackers , Peter Eisentraut Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Chao-San. A couple of comments for your v1-0001 cleanup patch. ====== src/bin/pg_dump/pg_dumpall.c I guess you were just making the minimal changes, but I thought parseDumpFormat could have been simplified more by removing that local variable entirely. BEFORE if (pg_strcasecmp(format, "c") == 0) archFormat = archCustom; else if (pg_strcasecmp(format, "custom") == 0) archFormat = archCustom; else if (pg_strcasecmp(format, "d") == 0) archFormat = archDirectory; else if (pg_strcasecmp(format, "directory") == 0) archFormat = archDirectory; else if (pg_strcasecmp(format, "p") == 0) archFormat = archNull; else if (pg_strcasecmp(format, "plain") == 0) archFormat = archNull; else if (pg_strcasecmp(format, "t") == 0) archFormat = archTar; else if (pg_strcasecmp(format, "tar") == 0) archFormat = archTar; SUGGESTION if (pg_strcasecmp(format, "c") == 0 || pg_strcasecmp(format, "custom") == 0) return archCustom; if (pg_strcasecmp(format, "d") == 0 || pg_strcasecmp(format, "directory") == 0) return archDirectory; if (pg_strcasecmp(format, "p") == 0 || pg_strcasecmp(format, "plain") == 0) return archNull; if (pg_strcasecmp(format, "t") == 0 || pg_strcasecmp(format, "tar") == 0) return archTar; ====== src/bin/psql/describe.c I know you were addressing only "new" issues, but it seemed a bit strange to fix only this one when there was the same issue earlier (~line 1780) in the same function. if (tableinfo.relkind == RELKIND_SEQUENCE) { PGresult *result = NULL; printQueryOpt myopt = pset.popt; ====== Kind Regards, Peter Smith. Fujitsu Australia