public inbox for [email protected]  
help / color / mirror / Atom feed
25.3. Continuous Archiving : Unix examples with Windows-style variables %-$
3+ messages / 3 participants
[nested] [flat]

* 25.3. Continuous Archiving : Unix examples with Windows-style variables %-$
@ 2018-08-23 09:54  PG Doc comments form <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2018-08-23 09:54 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

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


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: 25.3. Continuous Archiving : Unix examples with Windows-style variables %-$
@ 2018-08-23 12:54  Jonathan S. Katz <[email protected]>
  parent: PG Doc comments form <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Jonathan S. Katz @ 2018-08-23 12:54 UTC (permalink / raw)
  To: [email protected]; [email protected]

Hi,

> On Aug 23, 2018, at 5:54 AM, PG Doc comments form <[email protected]> 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



Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: 25.3. Continuous Archiving : Unix examples with Windows-style variables %-$
@ 2018-08-26 11:00  Milivoj Ivkovic <[email protected]>
  parent: Jonathan S. Katz <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Milivoj Ivkovic @ 2018-08-26 11:00 UTC (permalink / raw)
  To: [email protected]


> 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






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-08-26 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-23 09:54 25.3. Continuous Archiving : Unix examples with Windows-style variables %-$ PG Doc comments form <[email protected]>
2018-08-23 12:54 ` Jonathan S. Katz <[email protected]>
2018-08-26 11:00   ` Milivoj Ivkovic <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox