Skip site navigation (1) Skip section navigation (2)

Re: somewhat wrong archive_command example

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: somewhat wrong archive_command example
Date: 2011-09-21 23:02:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
On 09/21/2011 09:58 AM, Peter Eisentraut wrote:
> I can see a few problems with your script, as far as making it into a
> generally reusable example:
> - Uses bash.  Portable scripts shouldn't do this.
> - Overwrites PATH variable for unrelated purpose.
> - Path ($PATH) should be quoted everywhere.  (By contrast, you don't
> need the quotes in PATH="$1".  Just saying ...)
> - cp shouldn't be called with an absolute path.

Most of these problems stemmed from the unnoticed fact that I'd made 
PATH the name of my variable.  The absolute path for cp for example?  
Added that because it couldn't seem to find cp in the PATH, which was 
driving me crazy for a while there...sigh.

Attached version fixes the late night brain fade errors.  I think the 
right thing to do next is to package this up into a doc update that 
corrects the errors in that section too; just clean the whole thing up 
while I'm poking at it.  I'll submit that over to the hackers list so 
that everyone can take a shot at correcting my shell code.

Greg Smith   2ndQuadrant US    greg(at)2ndQuadrant(dot)com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support

Description: application/x-sh (672 bytes)

In response to


pgsql-docs by date

Next:From: Euler Taveira de OliveiraDate: 2011-09-22 00:59:43
Subject: Re: somewhat wrong archive_command example
Previous:From: Magnus HaganderDate: 2011-09-21 19:05:18
Subject: Re: Documentation 9.1 - can't be searched

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group