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

From Bruce Momjian
Subject Re: psql man page error?
Date
Msg-id 200612061539.kB6FdYn14111@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?
List pgsql-docs
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Peter Eisentraut wrote:
> >> Which is correct.  Removing the \\ alters the point of the example.
>
> > Well, if it doesn't render \\ at the end of the line, the example isn't
> > very clear unless you are looking at the SGML.
>
> No, you've completely misunderstood the original example.  It's
> intending to show a backslash-backslash terminator for the \x command,
> not two lines of input, ie the equivalent of this:
>
> regression=# \x \\ select 1,2;
> Expanded display is on.
> -[ RECORD 1 ]
> ?column? | 1
> ?column? | 2

You are right, I totally misunderstood it.  New patch applied, that
mentions \\ is a separator meta-command.  I now see \\ documented
farther down the file.  I didn't know it did that.

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

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.176
diff -c -c -r1.176 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml    5 Dec 2006 17:40:55 -0000    1.176
--- doc/src/sgml/ref/psql-ref.sgml    6 Dec 2006 15:37:30 -0000
***************
*** 87,95 ****
        it contains no <application>psql</application> specific features),
        or a single backslash command. Thus you cannot mix
        <acronym>SQL</acronym> and <application>psql</application>
!       meta-commands. To achieve that, you could pipe the string into
!       <application>psql</application>, like this: <literal>echo -e
!       "\\x\nSELECT * FROM foo;" | psql</literal>.
        </para>
        <para>
         If the command string contains multiple SQL commands, they are
--- 87,96 ----
        it contains no <application>psql</application> specific features),
        or a single backslash command. Thus you cannot mix
        <acronym>SQL</acronym> and <application>psql</application>
!       meta-commands with this option. To achieve that, you could
!       pipe the string into <application>psql</application>, like
!       this: <literal>echo "\x \\ SELECT * FROM foo;" | psql</literal>.
!       (<literal>\\</> is the separator meta-command.)
        </para>
        <para>
         If the command string contains multiple SQL commands, they are

pgsql-docs by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: psql man page error?
Next
From: Tom Lane
Date:
Subject: Re: psql man page error?