Thread: BUG #14201: In psql prompt2 %R can be (

BUG #14201: In psql prompt2 %R can be (

From
dpa-postgres@aegee.org
Date:
VGhlIGZvbGxvd2luZyBidWcgaGFzIGJlZW4gbG9nZ2VkIG9uIHRoZSB3ZWJz
aXRlOgoKQnVnIHJlZmVyZW5jZTogICAgICAxNDIwMQpMb2dnZWQgYnk6ICAg
ICAgICAgIERpbGlhbiBQYWxhdXpvdgpFbWFpbCBhZGRyZXNzOiAgICAgIGRw
YS1wb3N0Z3Jlc0BhZWdlZS5vcmcKUG9zdGdyZVNRTCB2ZXJzaW9uOiA5LjUu
MwpPcGVyYXRpbmcgc3lzdGVtOiAgIERvY3VtZW50YXRpb24KRGVzY3JpcHRp
b246ICAgICAgICAKCmRvYy9zZ21sL3JlZi9wc3FsLXJlZi5zZ21sID4gQWR2
YW5jZWQgRmVhdHVyZXMgPiBQcm9tcHRpbmcgPiAlUiBmb3JnZXRzIHRvCnN0
YXRlLCB0aGF0IGluIHByb21wdCAyIHRoZSBzdWJzdGl0dXRpb24gY2FuIGJl
IG9wZW4gcGFyZW50aGVzaXMsICBhcyBzZWVuCmluIHRoZSBiZWdpbm5pbmcg
b2YgdGhlIEV4YW1wbGVzIHNlY3Rpb24uDQoNCmh0dHBzOi8vZ2l0LnBvc3Rn
cmVzcWwub3JnL2dpdHdlYi8/cD1wb3N0Z3Jlc3FsLmdpdDthPWJsb2I7Zj1k
b2Mvc3JjL3NnbWwvcmVmL3BzcWwtcmVmLnNnbWwjbDM2MzIKCg==

Re: BUG #14201: In psql prompt2 %R can be (

From
Martín Marqués
Date:
El 19/06/16 a las 09:11, dpa-postgres@aegee.org escribió:
>
> doc/sgml/ref/psql-ref.sgml > Advanced Features > Prompting > %R forgets to
> state, that in prompt 2 the substitution can be open parenthesis,  as seen
> in the beginning of the Examples section.
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=doc/src/sgml/ref/psql-ref.sgml#l3632

That's correct, and a good catch.

Could you provide a patch which fixes the documentation?

--
Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



Re: BUG #14201: In psql prompt2 %R can be (

From
Дилян Палаузов
Date:
Hello,

here is a proposed patch.

On 06/19/2016 02:29 PM, Martín Marqués wrote:
> El 19/06/16 a las 09:11, dpa-postgres@aegee.org escribió:
>>
>> doc/sgml/ref/psql-ref.sgml > Advanced Features > Prompting > %R forgets to
>> state, that in prompt 2 the substitution can be open parenthesis,  as seen
>> in the beginning of the Examples section.
>>
>> https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=doc/src/sgml/ref/psql-ref.sgml#l3632
>
> That's correct, and a good catch.
>
> Could you provide a patch which fixes the documentation?
>

---
doc/sgml/ref/psql-ref.sgml > Advanced Features > Prompting > %R forgets to
state, that in prompt 2 the substitution can be an open parenthesis,  as
seen in the beginning of the Examples section:      testdb=> CREATE TABLE my_table (  testdb(>  first integer not null
default0,  testdb(>  second text)  testdb-> ;  CREATE TABLE 

diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index aef7228..972e38a 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -3630,11 +3630,11 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:'content');</userinput>         in
single-linemode, and <literal>!</literal> if the session is         disconnected from the database (which can happen if
       <command>\connect</command> fails). In prompt 2 the sequence is 
-        replaced by <literal>-</literal>, <literal>*</literal>, a single quote,
+        replaced by <literal>-</literal>, <literal>*</literal>, <literal>(</literal>, a single quote,         a double
quote,or a dollar sign, depending on whether         <application>psql</application> expects more input because the
   command wasn't terminated yet, because you are inside a 
-        <literal>/* ... */</literal> comment, or because you are inside
+        <literal>/* ... */</literal> comment, because psql expects a closing parenthesis, or because you are inside
    a quoted or dollar-escaped string. In prompt 3 the sequence doesn't         produce anything.         </para> 



Re: BUG #14201: In psql prompt2 %R can be (

From
Tom Lane
Date:
Дилян Палаузов <dpa-postgres@aegee.org> writes:
> On 06/19/2016 02:29 PM, Martín Marqués wrote:
>> El 19/06/16 a las 09:11, dpa-postgres@aegee.org escribió:
>>> doc/sgml/ref/psql-ref.sgml > Advanced Features > Prompting > %R forgets to
>>> state, that in prompt 2 the substitution can be open parenthesis,  as seen
>>> in the beginning of the Examples section.

>> That's correct, and a good catch.
>> Could you provide a patch which fixes the documentation?

> here is a proposed patch.

This patch didn't apply cleanly for me, but I incorporated the change
along with some extra wordsmithing.  Thanks for noticing this oversight!
        regards, tom lane