Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 092639FA2CB for ; Tue, 5 Dec 2006 13:22:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 43215-07 for ; Tue, 5 Dec 2006 13:22:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [64.127.99.90]) by postgresql.org (Postfix) with ESMTP id 5270D9F9FDA for ; Tue, 5 Dec 2006 13:22:39 -0400 (AST) Received: from localhost ([127.0.0.1]:46934) by glacier.frostconsultingllc.com with esmtp (Exim 4.63) (envelope-from ) id 1Gre04-0006IJ-PV; Tue, 05 Dec 2006 09:22:36 -0800 Date: Tue, 5 Dec 2006 09:22:36 -0800 (PST) From: Jeff Frost To: Simon Riggs cc: pgsql-docs@postgresql.org Subject: Re: psql man page error? In-Reply-To: <1165319827.3839.146.camel@silverbirch.site> Message-ID: References: <1165319827.3839.146.camel@silverbirch.site> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: jeff@frostconsultingllc.com X-SA-Exim-Scanned: No (on glacier.frostconsultingllc.com); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/6 X-Sequence-Number: 3929 On Tue, 5 Dec 2006, Simon Riggs wrote: > which gives > > prompt> echo "\x \\ select * from foo;" | psql > Expanded display is on. > invalid command \ > > i.e. doesn't work on bash. With bash the command should be: > > echo -e "\x \n select * from foo;" | psql > > which gives > > prompt> echo -e "\x \n select * from foo;" | psql > Expanded display is on. > ERROR: relation "foo" does not exist > > Does this mean there are multiple forms of the echo command, or is this > example just wrong? I believe that /bin/echo and the bash built-in used to be slightly different, although reviewing both man pages on my FC5 system seem to indicate that they have the same command-line arguments. It's also possible that I'm thinking back to my Solaris (2.5.1) days when the built-in tcsh echo was in fact different than /bin/echo. That's why all my scripts seem to call the binary and not the built-in. Another possibility is that the original author had the options set in his xpg_echo environment variable and forgot about it...or his distro was setting it in a profile.d file. -- Jeff Frost, Owner Frost Consulting, LLC http://www.frostconsultingllc.com/ Phone: 650-780-7908 FAX: 650-649-1954