Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 27af661

Browse files
committed
Message style tweaks
1 parent d479a0f commit 27af661

File tree

9 files changed

+18
-17
lines changed

9 files changed

+18
-17
lines changed

src/backend/commands/tablecmds.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -6924,7 +6924,8 @@ ATPrepAlterColumnType(List **wqueue,
69246924
else if (transform)
69256925
ereport(ERROR,
69266926
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
6927-
errmsg("ALTER TYPE USING is only supported on plain tables")));
6927+
errmsg("\"%s\" is not a table",
6928+
RelationGetRelationName(rel))));
69286929

69296930
if (tab->relkind == RELKIND_COMPOSITE_TYPE ||
69306931
tab->relkind == RELKIND_FOREIGN_TABLE)

src/backend/parser/parse_utilcmd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt)
15311531
if (index_rel->rd_rel->relam != get_am_oid(DEFAULT_INDEX_TYPE, false))
15321532
ereport(ERROR,
15331533
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1534-
errmsg("index \"%s\" is not a b-tree", index_name),
1534+
errmsg("index \"%s\" is not a btree", index_name),
15351535
parser_errposition(cxt->pstate, constraint->location)));
15361536

15371537
/* Must get indclass the hard way */

src/backend/port/win32/crashdump.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ crashDumpHandler(struct _EXCEPTION_POINTERS * pExceptionInfo)
105105
hDll = LoadLibrary("dbghelp.dll");
106106
if (hDll == NULL)
107107
{
108-
write_stderr("could not load dbghelp.dll, cannot write crashdump\n");
108+
write_stderr("could not load dbghelp.dll, cannot write crash dump\n");
109109
return EXCEPTION_CONTINUE_SEARCH;
110110
}
111111

112112
pDump = (MINIDUMPWRITEDUMP) GetProcAddress(hDll, "MiniDumpWriteDump");
113113

114114
if (pDump == NULL)
115115
{
116-
write_stderr("could not load required functions in dbghelp.dll, cannot write crashdump\n");
116+
write_stderr("could not load required functions in dbghelp.dll, cannot write crash dump\n");
117117
return EXCEPTION_CONTINUE_SEARCH;
118118
}
119119

@@ -144,16 +144,16 @@ crashDumpHandler(struct _EXCEPTION_POINTERS * pExceptionInfo)
144144
NULL);
145145
if (dumpFile == INVALID_HANDLE_VALUE)
146146
{
147-
write_stderr("could not open crash dump file %s for writing: error code %u\n",
147+
write_stderr("could not open crash dump file \"%s\" for writing: error code %u\n",
148148
dumpPath, (unsigned int) GetLastError());
149149
return EXCEPTION_CONTINUE_SEARCH;
150150
}
151151

152152
if ((*pDump) (selfProcHandle, selfPid, dumpFile, dumpType, &ExInfo,
153153
NULL, NULL))
154-
write_stderr("wrote crash dump to %s\n", dumpPath);
154+
write_stderr("wrote crash dump to file \"%s\"\n", dumpPath);
155155
else
156-
write_stderr("could not write crash dump to %s: error code %08x\n",
156+
write_stderr("could not write crash dump to file \"%s\": error code %08x\n",
157157
dumpPath, (unsigned int) GetLastError());
158158

159159
CloseHandle(dumpFile);

src/backend/storage/lmgr/predicate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ OldSerXidAdd(TransactionId xid, SerCommitSeqNo minConflictCommitSeqNo)
882882
oldSerXidControl->warningIssued = true;
883883
ereport(WARNING,
884884
(errmsg("memory for serializable conflict tracking is nearly exhausted"),
885-
errhint("There may be an idle transaction or a forgotten prepared transaction causing this.")));
885+
errhint("There might be an idle transaction or a forgotten prepared transaction causing this.")));
886886
}
887887
}
888888

src/backend/utils/adt/varlena.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3937,7 +3937,7 @@ text_format_string_conversion(StringInfo buf, char conversion,
39373937
else if (conversion == 'I')
39383938
ereport(ERROR,
39393939
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
3940-
errmsg("NULL cannot be escaped as an SQL identifier")));
3940+
errmsg("null values cannot be formatted as an SQL identifier")));
39413941
return;
39423942
}
39433943

src/backend/utils/misc/guc.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ static struct config_bool ConfigureNamesBool[] =
877877
},
878878
{
879879
{"restart_after_crash", PGC_SIGHUP, ERROR_HANDLING_OPTIONS,
880-
gettext_noop("Reinitialize after backend crash."),
880+
gettext_noop("Reinitialize server after backend crash."),
881881
NULL
882882
},
883883
&restart_after_crash,
@@ -1368,7 +1368,7 @@ static struct config_bool ConfigureNamesBool[] =
13681368

13691369
{
13701370
{"hot_standby_feedback", PGC_SIGHUP, WAL_STANDBY_SERVERS,
1371-
gettext_noop("Allows feedback from a hot standby primary that will avoid query conflicts."),
1371+
gettext_noop("Allows feedback from a hot standby to the primary that will avoid query conflicts."),
13721372
NULL
13731373
},
13741374
&hot_standby_feedback,
@@ -1557,7 +1557,7 @@ static struct config_int ConfigureNamesInt[] =
15571557

15581558
{
15591559
{"wal_receiver_status_interval", PGC_SIGHUP, WAL_STANDBY_SERVERS,
1560-
gettext_noop("Sets the maximum interval between WAL receiver status reports to the master."),
1560+
gettext_noop("Sets the maximum interval between WAL receiver status reports to the primary."),
15611561
NULL,
15621562
GUC_UNIT_S
15631563
},
@@ -2955,7 +2955,7 @@ static struct config_string ConfigureNamesString[] =
29552955

29562956
{
29572957
{"synchronous_standby_names", PGC_SIGHUP, WAL_REPLICATION,
2958-
gettext_noop("List of potential standby names to synchronize with."),
2958+
gettext_noop("List of names of potential synchronous standbys."),
29592959
NULL,
29602960
GUC_LIST_INPUT
29612961
},

src/test/regress/expected/foreign_data.out

+2-2
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,8 @@ ALTER FOREIGN TABLE ft1 ALTER COLUMN c5 DROP DEFAULT; -- ERROR
694694
ERROR: "ft1" is not a table or view
695695
ALTER FOREIGN TABLE ft1 ALTER COLUMN c6 SET NOT NULL;
696696
ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 DROP NOT NULL;
697-
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) using '0'; -- ERROR
698-
ERROR: ALTER TYPE USING is only supported on plain tables
697+
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) USING '0'; -- ERROR
698+
ERROR: "ft1" is not a table
699699
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10);
700700
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE text;
701701
-- can't change the column type if it's used elsewhere

src/test/regress/expected/text.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ select format('INSERT INTO %I VALUES(%L,%L)', 'mytab', NULL, 'Hello');
203203

204204
-- should fail, sql identifier cannot be NULL
205205
select format('INSERT INTO %I VALUES(%L,%L)', NULL, 10, 'Hello');
206-
ERROR: NULL cannot be escaped as an SQL identifier
206+
ERROR: null values cannot be formatted as an SQL identifier
207207
-- check positional placeholders
208208
select format('%1$s %3$s', 1, 2, 3);
209209
format

src/test/regress/sql/foreign_data.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ ALTER FOREIGN TABLE ft1 ALTER COLUMN c4 SET DEFAULT 0; -- ERROR
294294
ALTER FOREIGN TABLE ft1 ALTER COLUMN c5 DROP DEFAULT; -- ERROR
295295
ALTER FOREIGN TABLE ft1 ALTER COLUMN c6 SET NOT NULL;
296296
ALTER FOREIGN TABLE ft1 ALTER COLUMN c7 DROP NOT NULL;
297-
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) using '0'; -- ERROR
297+
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10) USING '0'; -- ERROR
298298
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10);
299299
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET DATA TYPE text;
300300
-- can't change the column type if it's used elsewhere

0 commit comments

Comments
 (0)