Received: from chaos.localnet.unwireduniverse.com (h0080ad81a8d6.ne.mediaone.net [24.128.16.163]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1BFoiE86280 for ; Mon, 11 Feb 2002 10:50:48 -0500 (EST) (envelope-from Derrell.Lipman@UnwiredUniverse.com) Received: from random.localnet.UnwiredUniverse.com (IDENT:smmsp@random.localnet.UnwiredUniverse.com [192.168.1.9]) by chaos.localnet.unwireduniverse.com (8.12.1/8.12.1) with ESMTP id g1BFom6S023995 for ; Mon, 11 Feb 2002 10:50:48 -0500 Received: (from derrell@localhost) by random.localnet.UnwiredUniverse.com (8.12.1/8.12.1/Submit) id g1BFolqR020006; Mon, 11 Feb 2002 10:50:48 -0500 X-Authentication-Warning: random.localnet.UnwiredUniverse.com: derrell set sender to Derrell.Lipman@UnwiredUniverse.com using -f To: pgsql-docs@postgresql.org Subject: "man psql" \set documentation error From: Derrell.Lipman@UnwiredUniverse.com Reply-To: Derrell.Lipman@UnwiredUniverse.com Date: Mon, 11 Feb 2002 10:50:47 -0500 Message-ID: Lines: 23 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Civil Service, i686-pc-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200202/19 X-Sequence-Number: 1248 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` Cheers, Derrell