Re: psql man page error? - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: psql man page error?
Date
Msg-id 200612052316.kB5NGq307285@momjian.us
Whole thread Raw
In response to Re: psql man page error?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql man page error?  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-docs
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > I think the proper fix is:
>
> >       <application>psql</application>, like this: <literal>echo -e
> >       "\\x\nSELECT * FROM foo;" | psql</literal>.
>
> > I think all modern operating systems understand echo -e at this point.
>
> No, they don't, and neither does the Single Unix Spec:
> http://www.opengroup.org/onlinepubs/007908799/xcu/echo.html
>
> So your version of the example depends on non-standards-compliant
> echo behavior, which is not better than before.

Well, at least my example works on _some_ operating systems, while the
previous worked on none of them, so it is _better_.

I can't think of a good way to do this except converting the example to
a <programlisting> block that will not change newlines:

    echo '\x
    SELECT * FROM foo;' | psql

Is that what people want?

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-docs by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: psql man page error?
Next
From: "Simon Riggs"
Date:
Subject: Re: psql man page error?