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 1gccZx-0001OY-Lx for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Dec 2018 20:48:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gccZv-0006Nw-4c for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Dec 2018 20:48:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gccZu-0006No-Oe for pgsql-hackers@lists.postgresql.org; Thu, 27 Dec 2018 20:48:26 +0000 Received: from mail-yb1-xb44.google.com ([2607:f8b0:4864:20::b44]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gccZr-000585-Kr for pgsql-hackers@postgresql.org; Thu, 27 Dec 2018 20:48:26 +0000 Received: by mail-yb1-xb44.google.com with SMTP id n187so4097942yba.6 for ; Thu, 27 Dec 2018 12:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=5dfaNUqT+HNPOmg9CfkyOAT6TN7msljHHNWP7bKpgYc=; b=BV6CjVovCJIOrsUqG3TXmhgGc9Tb0TJwnkjSR1CQibNU2XIp3pTz5Ew378tdzbqoZ6 pRfv/zGsk8gcAGHGGZpyc1azg+yMcpqev2TbSbONKr/e3l2GU2msEQSuSu+q1HYXy4lm cabOqIuk9u7F8yNeuH4ObCJxND+BmxW/Henxdc9Nk8Tu8pmerO7loCiR77NqswAmTl9x FiDqntxOGG2eFQvi76hgD8Fv4MCABC/cj890Jo5/Uv9NLZ6a1E+C+DdeFnecJEtoW3Kh g73jNG6ffHIYFQxqhVlArM+X9AMTEElCcvWUgwoD+n+w17keXldm4guQYGWx8l1HE9Gn Y7Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=5dfaNUqT+HNPOmg9CfkyOAT6TN7msljHHNWP7bKpgYc=; b=jCcrOU3DzBhbHRFo7lQ19u2nIqd9RPgkIdPbIxrSoipcivy6RmQ5YKqYp3IePZFmEQ 9MHWKzldNRdyHPxEOQ8s0UTp1/CUOHCEWHDdKHHDRuI10ifoG/VKw+ingi45tl9zUccf EIwuJ1ly7VUr1IA92eiT+KJ5TowLgNEKSusip+Krgrmk1jCCDEMhfWrogaKgW2GLuBPC GFhOLPSP0qCvTStTBJcYNqEey6X16qvDEeHinU5afalj2eTeR7K+eJH7vez1GJ1tflWI PXX3RoXSC+5RpFutcaWMR81GHw41k0zkcCAFBC0pFWQaDQJSwJA+sdjyf8UhydhbMCA4 8ZEQ== X-Gm-Message-State: AJcUukd8g9xNbNFURzbhWoaLXds9QiKTciwJkAkokPirhKbG3QV9pzAH +FiU61E715I35SLSXvZAb3/R+QPyMh6mEvukpsM0n0AtYn9Kxrr+mkBXwVCJXKImgrtucR+ILbg dSuzOc6M0ka2QfJLnOR3OikivpZik4lzQLKB5FWeEMOw54vN64KNxPJqY5JvyXMcKGrtO6Zpkgm gVCp80OMwaQr4e X-Google-Smtp-Source: ALg8bN7UmmxEj/FsSKgIb4kyav3HFSHr0D5Wl/fx8UUAYaZVg0q2xp4p2m5+Gyr4Xv7o8DCu5R1vLQ== X-Received: by 2002:a25:bf86:: with SMTP id l6mr16355271ybk.77.1545943701261; Thu, 27 Dec 2018 12:48:21 -0800 (PST) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id x82sm14495302ywb.34.2018.12.27.12.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Dec 2018 12:48:20 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: reducing the footprint of ScanKeyword (was Re: Large writable variables) To: Tom Lane Cc: John Naylor , Robert Haas , Andres Freund , Andrew Gierth , "pgsql-hackers@postgresql.org" References: <25160.1545086368@sss.pgh.pa.us> <31505.1545149557@sss.pgh.pa.us> <87lg4luimz.fsf@news-spur.riddles.org.uk> <20181220010114.k3wv6r25sc7sr7z5@alap3.anarazel.de> <8228.1545937024@sss.pgh.pa.us> <7b06b66e-f916-8e63-1470-d7a85d2f1e5a@2ndQuadrant.com> <11766.1545942853@sss.pgh.pa.us> Openpgp: preference=signencrypt Autocrypt: addr=andrew.dunstan@2ndQuadrant.com; prefer-encrypt=mutual; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNL0FuZHJldyBEdW5zdGFuIDxhbmRyZXcuZHVuc3RhbkAybmRRdWFkcmFudC5jb20+wsCY BBMBAgBCAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUJDyV6hBYhBOQ+WEYd/Hy/RGkV pZn6f8tZ/DuBBQJcH/EVAhkBAAoJEJn6f8tZ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oo9mIHFakgWgOBMuxoWfjONiLjjLh/9+ZIqSSLX Message-ID: <317a714b-5056-4e4e-3911-9fd94ac3af5a@2ndQuadrant.com> Date: Thu, 27 Dec 2018 15:48:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <11766.1545942853@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/27/18 3:34 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 12/27/18 3:00 PM, John Naylor wrote: >>> This style was cargo-culted from the catalog scripts. I can settle on >>> just the first form if you like. >> I would rather we used the standard perl module Getopt::Long, as >> numerous programs we have already do. > Hmm ... grepping finds that used only in > > src/tools/pgindent/pgindent > src/tools/git_changelog > src/pl/plperl/text2macro.pl > > so I'm not quite sure about the "numerous" claim. Adopting that > here would possibly impose the requirement of having Getopt::Long > on some developers who are getting by without it today. However, > that's a pretty thin argument, and if Getopt::Long is present even > in the most minimal Perl installations then it's certainly moot. It's bundled separately, but on both systems I looked at it's needed by the base perl package. I don't recall ever seeing a system where it's not available. I'm reasonably careful about what packages the buildfarm requires, and it's used Getopt::Long from day one. > > On the whole I'm +1 for this. Perhaps also, as an independent patch, > we should change the catalog scripts to use Getopt::Long. > > Probably some others, too. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services