Change < to -f in examples with input files

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

Change < to -f in examples with input files

От:
David Fetter <david@fetter.org>
Дата:
Вложения:
Folks,

Please find enclosed a patch, per Dennis Björklund, that uses -f for
input files rather than <.  This makes error messages, &c. more
expressive.

Cheers,
D
-- 
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

Re: Change < to -f in examples with input files

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
David Fetter wrote:
> Please find enclosed a patch, per Dennis Björklund, that uses -f for
> input files rather than <.  This makes error messages, &c. more
> expressive.

To be portable, options must be before non-option arguments, so you need 
to rearrange the command-line arguments in the examples if you want to 
make that change.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: Change < to -f in examples with input files

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
David Fetter wrote:
> 
> Please find enclosed a patch, per Dennis Bjrklund, that uses -f for
> input files rather than <.  This makes error messages, &c. more
> expressive.

Uh, how is it more expressive?  The only difference I see is the line
numbers.  Is that it?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Change < to -f in examples with input files

От:
David Fetter <david@fetter.org>
Дата:
On Mon, Feb 21, 2005 at 02:18:31PM -0500, Bruce Momjian wrote:
> David Fetter wrote:
> > 
> > Please find enclosed a patch, per Dennis Bjrklund, that
> > uses -f for input files rather than <.  This makes error messages,
> > &c. more expressive.
> 
> Uh, how is it more expressive?  The only difference I see is the
> line numbers.  Is that it?

That could be a very big deal in case of error on a large file, so
yes.

Cheers,
D
-- 
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

Re: Change < to -f in examples with input files

От:
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Дата:
>>Uh, how is it more expressive?  The only difference I see is the
>>line numbers.  Is that it?
> 
> 
> That could be a very big deal in case of error on a large file, so
> yes.

In IRC, I always recommend that ppl use -f, since it's so much more 
useful :)

Chris

Re: Change < to -f in examples with input files

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
David Fetter wrote:

> Please find enclosed a patch, per Dennis Bjrklund, that uses -f
> for input files rather than <.  This makes error messages, &c. more
> expressive.
> 
> David Fetter

Applied.  Thanks.

(I reordered the arguments as Peter suggested.)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/backup.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/backup.sgml,v
retrieving revision 2.55
diff -c -r2.55 backup.sgml
*** doc/src/sgml/backup.sgml	22 Jan 2005 22:56:35 -0000	2.55
--- doc/src/sgml/backup.sgml	20 Feb 2005 20:45:07 -0000
***************
*** 177,183 ****
  
      The resulting dump can be restored with psql</>:
  
! psql template1 < infile
  
      (Actually, you can specify any existing database name to start from,
      but if you are reloading in an empty cluster then template1</>
--- 177,183 ----
  
      The resulting dump can be restored with psql</>:
  
! psql -f infile template1
  
      (Actually, you can specify any existing database name to start from,
      but if you are reloading in an empty cluster then template1</>
***************
*** 1210,1216 ****
  gmake install
  initdb -D /usr/local/pgsql/data
  postmaster -D /usr/local/pgsql/data
! psql template1 < backup
  
  
     See  about ways to start and stop the
--- 1210,1216 ----
  gmake install
  initdb -D /usr/local/pgsql/data
  postmaster -D /usr/local/pgsql/data
! psql -f backup template1
  
  
     See  about ways to start and stop the
FAQ