Re: psql prompts with invisible characters - Mailing list pgsql-patches

From Tom Lane
Subject Re: psql prompts with invisible characters
Date
Msg-id 9816.1074540517@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql prompts with invisible characters  (Reece Hart <reece@in-machina.com>)
Responses Re: psql prompts with invisible characters, take III  (Reece Hart <reece@in-machina.com>)
List pgsql-patches
Reece Hart <reece@in-machina.com> writes:
> The RL_PROMPT_* markers are undocumented features of readline. The patch
> I sent works fine with RL 4.2 and 4.3 on linux-x86. From the readline
> changelogs, I deduced that these were added with 4.0 (ca. Feb 1999).

Hm.  I don't recall whether we still pretend to support pre-4.0 readlines.
The "undocumented" bit actually bothers me rather more.  I guess what we
can do is wrap the code in "ifdef RL_PROMPT_START_IGNORE" to keep from
blowing up if it's not present.

> Let's chop the #else clause and leave it at that.

Agreed.

> BTW, is there a coding style guide or pgsql-patch guide somewhere?

Not really; so far we've gotten away with "do like you see established
contributors doing".

> For
> example, are patches acceptable as attachments (as opposed to inline)?

Doesn't matter.  We ask for "diff -c" format (plain diff is unsafe if
there have been any other changes in the files, and diff -u is harder to
read, at least in the opinions of those who are likely to review PG
patches).  How you package it in your message is your choice.  If you
use a mail program that might munge whitespace or linebreaks then an
attachment is probably the safest plan.

> And, is it preferred to diff against cvs instead? If so, which branch?

In general a diff against CVS HEAD will be the least pain to apply.  In
this particular case it won't matter much, since those files haven't
changed recently.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Patch for search_path --- apply to 7.4 branch?
Next
From: Alvaro Herrera
Date:
Subject: trivial typos