Обсуждение: 25.3. Continuous Archiving : Unix examples with Windows-stylevariables %-$

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

25.3. Continuous Archiving : Unix examples with Windows-stylevariables %-$

От
PG Doc comments form
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.4/static/continuous-archiving.html
Description:

Most examples in "25.3. Continuous Archiving and Point-in-Time Recovery
(PITR)" use Unix commands and paths, but all variables are written as
Windows batch file variables (Windows "%var" / Unix "$var").

For example, the first one on the page has

    archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p
/mnt/server/archivedir/%f'  # Unix

Instead of

    archive_command = 'test ! -f /mnt/server/archivedir/$f && cp $p
/mnt/server/archivedir/$f'  # Unix

or possibly

   archive_command = '[ -f /mnt/server/archivedir/$f ] || cp $p
/mnt/server/archivedir/$f'  # Unix


https://www.postgresql.org/docs/current/static/continuous-archiving.html

Re: 25.3. Continuous Archiving : Unix examples with Windows-stylevariables %-$

От
"Jonathan S. Katz"
Дата:
Hi,

> On Aug 23, 2018, at 5:54 AM, PG Doc comments form <noreply@postgresql.org> wrote:
>
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.4/static/continuous-archiving.html
> Description:
>
> Most examples in "25.3. Continuous Archiving and Point-in-Time Recovery
> (PITR)" use Unix commands and paths, but all variables are written as
> Windows batch file variables (Windows "%var" / Unix "$var”).

These are special variables that PostgreSQL replaces regardless of
operating system. Per the paragraph above the examples:

    "In archive_command, %p is replaced by the path name of the
    file to archive, while %f is replaced by only the file name.”

Thanks,

Jonathan


Вложения

Re: 25.3. Continuous Archiving : Unix examples with Windows-stylevariables %-$

От
Milivoj Ivkovic
Дата:
> These are special variables that PostgreSQL replaces regardless of
> operating system. Per the paragraph above the examples:

Oops! Sorry. Should read more thoroughly before sending stupid comments 
on this excellent documentation!

Thank you for taking the time to clarify.

Mi