From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Derrell.Lipman@UnwiredUniverse.com
Cc: pgsql-docs@postgresql.org
Subject: Re: "man psql" \set documentation error
Date: Mon, 18 Feb 2002 12:42:01 -0500 (EST)
Message-ID: <200202181742.g1IHg1x02806@candle.pha.pa.us> (raw)
In-Reply-To: <eljs6mqw.fsf@random.localnet.UnwiredUniverse.com>
Derrell.Lipman@UnwiredUniverse.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@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: pgman@candle.pha.pa.us, Derrell.Lipman@UnwiredUniverse.com
Subject: Re: "man psql" \set documentation error
In-Reply-To: <200202181742.g1IHg1x02806@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox