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

Re: "man psql" \set documentation error

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Derrell(dot)Lipman(at)UnwiredUniverse(dot)com
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: "man psql" \set documentation error
Date: 2002-02-18 17:42:01
Message-ID: 200202181742.g1IHg1x02806@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-docs
Derrell(dot)Lipman(at)UnwiredUniverse(dot)com wrote:
> Running an application and \set'ing its output in a variable requires use of
> the backtick '`' operator.  Under the heading "SQL INTERPOLATION", the
> examples should be as follows (the difference being use of backticks instead
> of single quotes around the command to be executed):
> 
> Current (wrong):
>        testdb=> \set content '\'' 'cat my_file.txt' '\''
> 
> Correct:
>        testdb=> \set content '\'' `cat my_file.txt` '\''
> 
> 
> 
> Current (wrong):
>        testdb=> \set content 'sed -e "s/'/\\\\\\'/g" < my_file.txt'
> 
> Correct:
>        testdb=> \set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`
> 

I just checked and it looks fine in current sources.  Does it look right
in your browser:

	http://candle.pha.pa.us/main/writings/pgsql/sgml/app-psql.html

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-docs by date

Next:From: Thomas F. O'ConnellDate: 2002-02-18 21:49:36
Subject: patches
Previous:From: Vince VielhaberDate: 2002-02-18 15:12:20
Subject: Re: 7.2 docs

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