Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iLnwq-0004Jz-T2 for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Oct 2019 12:35:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iLnwp-0007vn-6V for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Oct 2019 12:35:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iLnwo-0007vf-P0 for pgsql-hackers@lists.postgresql.org; Sat, 19 Oct 2019 12:35:06 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iLnwi-0003EB-2B for pgsql-hackers@postgresql.org; Sat, 19 Oct 2019 12:35:05 +0000 Received: by mail-lj1-x22f.google.com with SMTP id j19so8836625lja.1 for ; Sat, 19 Oct 2019 05:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=q8hSg5ikFP7Dd/p5oYMDRmi9Z+DDJf0tVYzxi9HVrwg=; b=enN/faxS+STlv6dqSzh7LvG5tev6w2/op9pBCe957qhLL+9NyzhJKPBjswP+DgJpQi JgZ5i6pbU6r/S7HYBdwQ6kXpg3A/pDCIS7wqy9alEz19AwYe4cLU03M2KQi9xTzefAbW VtPpK5+8wsPc1R/xH+rqAcXlUIAuOoXPIzjZ0EEN5PD6DGqVs+Gd5+Ck/VQajpsk3fZi K0IMeSigHZ4Fgj2MZ/q1Ig0u9D+iVGgvHTspr4lx9GReJUF062kOse43ExIHdiOTwGD5 Eb1Jy6gtJcZ1rsrgSTLuybGZz7E0LICvhwYjm+Pxfk2CUaQFSHLtRbTUPYI+SgLP68ap ySdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=q8hSg5ikFP7Dd/p5oYMDRmi9Z+DDJf0tVYzxi9HVrwg=; b=LDDhkywzkvK6Sz14M9icc/Dry2tqXuRTeMIMa35ugEFfVRXePUpOlnU/YPgLnh2UAt S9DYmlH3bx2xRnVDHYTd9i0bWBPsCmSyABSC/kalEtbm86TpXd5DpxZgl4aTeECwmL6r HZjeBOYpBgnckLDBvEeNYJxn6H8HtXX9veME9mvJU/8DwgrvR385RqdLW6DDFyN5eBf+ SeJi2jDGIgUr2vgHDdtktapLrRd7TJKgFlnurP/EDfNRz/UG6VG1p7qp4ar5mhra06ZK Gy8O6uaA6N3qBf7eA/bPNRO5RYiOCm5W1yGzHrGcQ0/IP0PogwdNYUokdCpf/mWz0t88 2dEA== X-Gm-Message-State: APjAAAW4+BSAjM9hBubKxuZTM+Ac6nY+zaQIihLTKWGZiR+2zV9PESQO XEA4lVU1Ezo3K+dXUWG+Wof43c56 X-Google-Smtp-Source: APXvYqxI3dn5BrEoOc5PGWDJ9TRR/zIyiQ9Q9zZsA/qozeJHKHOViaBDSqXnGJ+PCOol7c2u7Nz72Q== X-Received: by 2002:a2e:9f4d:: with SMTP id v13mr8058367ljk.180.1571488497905; Sat, 19 Oct 2019 05:34:57 -0700 (PDT) Received: from [1.0.0.7] ([178.155.4.8]) by smtp.gmail.com with ESMTPSA id w13sm3923066lfe.84.2019.10.19.05.34.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Oct 2019 05:34:57 -0700 (PDT) To: pgsql-hackers From: Alexander Lakhin Subject: Remove obsolete options for createuser Message-ID: <5da284a2-62d9-e338-88d1-26ee5009d93e@gmail.com> Date: Sat, 19 Oct 2019 15:34:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------42DD991531184ECA86F40A45" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------42DD991531184ECA86F40A45 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hello hackers, I've noticed that the createuser utility supports two undocumented options (--adduser, --no-adduser), that became obsolete in 2005. I believe that their existence should come to end someday (maybe today?). The patch to remove them is attached. Best regards. Alexander --------------42DD991531184ECA86F40A45 Content-Type: text/x-patch; name="remove-createuser-adduser.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="remove-createuser-adduser.patch" diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c index 973ba525b2..c8db5e0bd1 100644 --- a/src/bin/scripts/createuser.c +++ b/src/bin/scripts/createuser.c @@ -43,9 +43,6 @@ main(int argc, char *argv[]) {"replication", no_argument, NULL, 1}, {"no-replication", no_argument, NULL, 2}, {"interactive", no_argument, NULL, 3}, - /* adduser is obsolete, undocumented spelling of superuser */ - {"adduser", no_argument, NULL, 'a'}, - {"no-adduser", no_argument, NULL, 'A'}, {"connection-limit", required_argument, NULL, 'c'}, {"pwprompt", no_argument, NULL, 'P'}, {"encrypted", no_argument, NULL, 'E'}, @@ -88,7 +85,7 @@ main(int argc, char *argv[]) handle_help_version_opts(argc, argv, "createuser", help); - while ((c = getopt_long(argc, argv, "h:p:U:g:wWedDsSaArRiIlLc:PE", + while ((c = getopt_long(argc, argv, "h:p:U:g:wWedDsSrRiIlLc:PE", long_options, &optindex)) != -1) { switch (c) @@ -121,11 +118,9 @@ main(int argc, char *argv[]) createdb = TRI_NO; break; case 's': - case 'a': superuser = TRI_YES; break; case 'S': - case 'A': superuser = TRI_NO; break; case 'r': --------------42DD991531184ECA86F40A45--