Skip to content

Commit 21bfc87

Browse files
committed
Merge branch 'REL9_5_STABLE' into PGPRO9_5
2 parents 2f63192 + a3eb19b commit 21bfc87

File tree

6 files changed

+31
-23
lines changed

6 files changed

+31
-23
lines changed

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,11 +3294,12 @@ testdb=&gt; <userinput>INSERT INTO my_table VALUES (:'content');</userinput>
32943294
and special escape sequences that describe the appearance of the
32953295
prompt. Prompt 1 is the normal prompt that is issued when
32963296
<application>psql</application> requests a new command. Prompt 2 is
3297-
issued when more input is expected during command input because the
3298-
command was not terminated with a semicolon or a quote was not closed.
3299-
Prompt 3 is issued when you run an <acronym>SQL</acronym>
3300-
<command>COPY</command> command and you are expected to type in the
3301-
row values on the terminal.
3297+
issued when more input is expected during command entry, for example
3298+
because the command was not terminated with a semicolon or a quote
3299+
was not closed.
3300+
Prompt 3 is issued when you are running an <acronym>SQL</acronym>
3301+
<command>COPY FROM STDIN</command> command and you need to type in
3302+
a row value on the terminal.
33023303
</para>
33033304

33043305
<para>
@@ -3378,17 +3379,20 @@ testdb=&gt; <userinput>INSERT INTO my_table VALUES (:'content');</userinput>
33783379
<term><literal>%R</literal></term>
33793380
<listitem>
33803381
<para>
3381-
In prompt 1 normally <literal>=</literal>, but <literal>^</literal> if
3382-
in single-line mode, and <literal>!</literal> if the session is
3383-
disconnected from the database (which can happen if
3384-
<command>\connect</command> fails). In prompt 2 the sequence is
3385-
replaced by <literal>-</literal>, <literal>*</literal>, a single quote,
3386-
a double quote, or a dollar sign, depending on whether
3387-
<application>psql</application> expects more input because the
3388-
command wasn't terminated yet, because you are inside a
3389-
<literal>/* ... */</literal> comment, or because you are inside
3390-
a quoted or dollar-escaped string. In prompt 3 the sequence doesn't
3391-
produce anything.
3382+
In prompt 1 normally <literal>=</literal>,
3383+
but <literal>^</literal> if in single-line mode,
3384+
or <literal>!</literal> if the session is disconnected from the
3385+
database (which can happen if <command>\connect</command> fails).
3386+
In prompt 2 <literal>%R</literal> is replaced by a character that
3387+
depends on why <application>psql</application> expects more input:
3388+
<literal>-</literal> if the command simply wasn't terminated yet,
3389+
but <literal>*</literal> if there is an unfinished
3390+
<literal>/* ... */</literal> comment,
3391+
a single quote if there is an unfinished quoted string,
3392+
a double quote if there is an unfinished quoted identifier,
3393+
a dollar sign if there is an unfinished dollar-quoted string,
3394+
or <literal>(</literal> if there is an unmatched left parenthesis.
3395+
In prompt 3 <literal>%R</literal> doesn't produce anything.
33923396
</para>
33933397
</listitem>
33943398
</varlistentry>

src/backend/access/transam/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ of optimising for performance. When a hint is written we use
624624
MarkBufferDirtyHint() to mark the block dirty.
625625

626626
If the buffer is clean and checksums are in use then
627-
MarkBufferDirtyHint() inserts an XLOG_HINT record to ensure that we
627+
MarkBufferDirtyHint() inserts an XLOG_FPI record to ensure that we
628628
take a full page image that includes the hint. We do this to avoid
629629
a partial page write, when we write the dirtied page. WAL is not
630630
written during recovery, so we simply skip dirtying blocks because

src/backend/postmaster/postmaster.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,14 @@ PostmasterMain(int argc, char *argv[])
821821
if (output_config_variable != NULL)
822822
{
823823
/*
824-
* permission is handled because the user is reading inside the data
825-
* dir
824+
* "-C guc" was specified, so print GUC's value and exit. No extra
825+
* permission check is needed because the user is reading inside the
826+
* data dir.
826827
*/
827-
puts(GetConfigOption(output_config_variable, false, false));
828+
const char *config_val = GetConfigOption(output_config_variable,
829+
false, false);
830+
831+
puts(config_val ? config_val : "(null)");
828832
ExitPostmaster(0);
829833
}
830834

src/backend/storage/buffer/bufmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3120,7 +3120,7 @@ IncrBufferRefCount(Buffer buffer)
31203120
* This is essentially the same as MarkBufferDirty, except:
31213121
*
31223122
* 1. The caller does not write WAL; so if checksums are enabled, we may need
3123-
* to write an XLOG_HINT WAL record to protect against torn pages.
3123+
* to write an XLOG_FPI WAL record to protect against torn pages.
31243124
* 2. The caller might have only share-lock instead of exclusive-lock on the
31253125
* buffer's content lock.
31263126
* 3. This function does not guarantee that the buffer is always marked dirty

src/backend/utils/adt/inet_net_pton.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ inet_cidr_pton_ipv6(const char *src, u_char *dst, size_t size)
496496
else if (*src == '\0')
497497
goto enoent;
498498
if (tp + NS_INT16SZ > endp)
499-
return (0);
499+
goto enoent;
500500
*tp++ = (u_char) (val >> 8) & 0xff;
501501
*tp++ = (u_char) val & 0xff;
502502
saw_xdigit = 0;

src/bin/psql/command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2943,7 +2943,7 @@ static bool
29432943
do_watch(PQExpBuffer query_buf, long sleep)
29442944
{
29452945
printQueryOpt myopt = pset.popt;
2946-
char title[50];
2946+
char title[256];
29472947

29482948
if (!query_buf || query_buf->len <= 0)
29492949
{

0 commit comments

Comments
 (0)