Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: John Naylor <jcnaylor(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
Date: 2018-12-27 20:20:41
Message-ID: 7b06b66e-f916-8e63-1470-d7a85d2f1e5a@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 12/27/18 3:00 PM, John Naylor wrote:
> On 12/27/18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> diff --git a/src/tools/gen_keywords.pl b/src/tools/gen_keywords.pl
>> + elsif ($arg =~ /^-o/)
>> + {
>> + $output_path = length($arg) > 2 ? substr($arg, 2) : shift @ARGV;
>> + }
>>
>> My perl-fu is not great, but it looks like this will accept arguments
>> like "-ofilename", which is a style I don't like at all. I'd rather
>> either insist on the filename being separate or write the switch like
>> "-o=filename". Also, project style when taking both forms is usually
>> more like
>> -o filename
>> --offset=filename
> 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.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-12-27 20:34:13 Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
Previous Message Tom Lane 2018-12-27 20:19:50 Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)