Обсуждение: pg_indent instructions

Поиск
Список
Период
Сортировка

pg_indent instructions

От
Andrew Dunstan
Дата:
The README for pg_indent says:


    ./configure     # "make" will not work in an unconfigured tree
    cd src/include/catalog
    make reformat-dat-files
    cd ../../..


This looks like a case of using a sledgehammer to crack a nut.

I did this, which amounts to the same thing and is faster:

    cd src/include/catalog
    perl ./reformat_dat_file.pl --output . ./pg_*.dat
    cd ../../..


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Re: pg_indent instructions

От
Tom Lane
Дата:
Andrew Dunstan <andrew@dunslane.net> writes:
> The README for pg_indent says:

>     ./configure     # "make" will not work in an unconfigured tree
>     cd src/include/catalog
>     make reformat-dat-files
>     cd ../../..

> This looks like a case of using a sledgehammer to crack a nut.

> I did this, which amounts to the same thing and is faster:

>     cd src/include/catalog
>     perl ./reformat_dat_file.pl --output . ./pg_*.dat
>     cd ../../..

True, that saves having to do a configure run, but it also embeds
some assumptions that personally I could do without --- mainly
about which perl you want to use.  In any case, configure is
pretty quick as long as you've got it set up to use a cache file.

One thing we should do, perhaps, is remove the "cd" steps in
favor of recommending

make -C src/include/catalog reformat-dat-files

            regards, tom lane