Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0a999e12
Commit
0a999e12
authored
Apr 24, 2019
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify error messages
... for translatability purposes.
parent
5c470491
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
10 deletions
+27
-10
src/backend/storage/ipc/latch.c
src/backend/storage/ipc/latch.c
+9
-3
src/backend/storage/ipc/signalfuncs.c
src/backend/storage/ipc/signalfuncs.c
+3
-1
src/backend/utils/adt/formatting.c
src/backend/utils/adt/formatting.c
+6
-3
src/backend/utils/adt/genfile.c
src/backend/utils/adt/genfile.c
+3
-1
src/backend/utils/adt/json.c
src/backend/utils/adt/json.c
+3
-1
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonb.c
+3
-1
No files found.
src/backend/storage/ipc/latch.c
View file @
0a999e12
...
@@ -856,7 +856,9 @@ WaitEventAdjustEpoll(WaitEventSet *set, WaitEvent *event, int action)
...
@@ -856,7 +856,9 @@ WaitEventAdjustEpoll(WaitEventSet *set, WaitEvent *event, int action)
if
(
rc
<
0
)
if
(
rc
<
0
)
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode_for_socket_access
(),
(
errcode_for_socket_access
(),
errmsg
(
"epoll_ctl() failed: %m"
)));
/* translator: %s is a syscall name, such as "poll()" */
errmsg
(
"%s failed: %m"
,
"epoll_ctl()"
)));
}
}
#endif
#endif
...
@@ -1087,7 +1089,9 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
...
@@ -1087,7 +1089,9 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
waiting
=
false
;
waiting
=
false
;
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode_for_socket_access
(),
(
errcode_for_socket_access
(),
errmsg
(
"epoll_wait() failed: %m"
)));
/* translator: %s is a syscall name, such as "poll()" */
errmsg
(
"%s failed: %m"
,
"epoll_wait()"
)));
}
}
return
0
;
return
0
;
}
}
...
@@ -1211,7 +1215,9 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
...
@@ -1211,7 +1215,9 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
waiting
=
false
;
waiting
=
false
;
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode_for_socket_access
(),
(
errcode_for_socket_access
(),
errmsg
(
"poll() failed: %m"
)));
/* translator: %s is a syscall name, such as "poll()" */
errmsg
(
"%s failed: %m"
,
"poll()"
)));
}
}
return
0
;
return
0
;
}
}
...
...
src/backend/storage/ipc/signalfuncs.c
View file @
0a999e12
...
@@ -181,7 +181,9 @@ pg_rotate_logfile(PG_FUNCTION_ARGS)
...
@@ -181,7 +181,9 @@ pg_rotate_logfile(PG_FUNCTION_ARGS)
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INSUFFICIENT_PRIVILEGE
),
(
errcode
(
ERRCODE_INSUFFICIENT_PRIVILEGE
),
(
errmsg
(
"must be superuser to rotate log files with adminpack 1.0"
),
(
errmsg
(
"must be superuser to rotate log files with adminpack 1.0"
),
errhint
(
"Consider using pg_logfile_rotate(), which is part of core, instead."
))));
/* translator: %s is a SQL function name */
errhint
(
"Consider using %s, which is part of core, instead."
,
"pg_logfile_rotate()"
))));
if
(
!
Logging_collector
)
if
(
!
Logging_collector
)
{
{
...
...
src/backend/utils/adt/formatting.c
View file @
0a999e12
...
@@ -1566,7 +1566,8 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
...
@@ -1566,7 +1566,8 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
*/
*/
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INDETERMINATE_COLLATION
),
(
errcode
(
ERRCODE_INDETERMINATE_COLLATION
),
errmsg
(
"could not determine which collation to use for lower() function"
),
errmsg
(
"could not determine which collation to use for %s function"
,
"lower()"
),
errhint
(
"Use the COLLATE clause to set the collation explicitly."
)));
errhint
(
"Use the COLLATE clause to set the collation explicitly."
)));
}
}
mylocale
=
pg_newlocale_from_collation
(
collid
);
mylocale
=
pg_newlocale_from_collation
(
collid
);
...
@@ -1688,7 +1689,8 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
...
@@ -1688,7 +1689,8 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
*/
*/
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INDETERMINATE_COLLATION
),
(
errcode
(
ERRCODE_INDETERMINATE_COLLATION
),
errmsg
(
"could not determine which collation to use for upper() function"
),
errmsg
(
"could not determine which collation to use for %s function"
,
"upper()"
),
errhint
(
"Use the COLLATE clause to set the collation explicitly."
)));
errhint
(
"Use the COLLATE clause to set the collation explicitly."
)));
}
}
mylocale
=
pg_newlocale_from_collation
(
collid
);
mylocale
=
pg_newlocale_from_collation
(
collid
);
...
@@ -1811,7 +1813,8 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
...
@@ -1811,7 +1813,8 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
*/
*/
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INDETERMINATE_COLLATION
),
(
errcode
(
ERRCODE_INDETERMINATE_COLLATION
),
errmsg
(
"could not determine which collation to use for initcap() function"
),
errmsg
(
"could not determine which collation to use for %s function"
,
"initcap()"
),
errhint
(
"Use the COLLATE clause to set the collation explicitly."
)));
errhint
(
"Use the COLLATE clause to set the collation explicitly."
)));
}
}
mylocale
=
pg_newlocale_from_collation
(
collid
);
mylocale
=
pg_newlocale_from_collation
(
collid
);
...
...
src/backend/utils/adt/genfile.c
View file @
0a999e12
...
@@ -219,7 +219,9 @@ pg_read_file(PG_FUNCTION_ARGS)
...
@@ -219,7 +219,9 @@ pg_read_file(PG_FUNCTION_ARGS)
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INSUFFICIENT_PRIVILEGE
),
(
errcode
(
ERRCODE_INSUFFICIENT_PRIVILEGE
),
(
errmsg
(
"must be superuser to read files with adminpack 1.0"
),
(
errmsg
(
"must be superuser to read files with adminpack 1.0"
),
errhint
(
"Consider using pg_file_read(), which is part of core, instead."
))));
/* translator: %s is a SQL function name */
errhint
(
"Consider using %s, which is part of core, instead."
,
"pg_file_read()"
))));
/* handle optional arguments */
/* handle optional arguments */
if
(
PG_NARGS
()
>=
3
)
if
(
PG_NARGS
()
>=
3
)
...
...
src/backend/utils/adt/json.c
View file @
0a999e12
...
@@ -2192,7 +2192,9 @@ json_build_object(PG_FUNCTION_ARGS)
...
@@ -2192,7 +2192,9 @@ json_build_object(PG_FUNCTION_ARGS)
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INVALID_PARAMETER_VALUE
),
(
errcode
(
ERRCODE_INVALID_PARAMETER_VALUE
),
errmsg
(
"argument list must have even number of elements"
),
errmsg
(
"argument list must have even number of elements"
),
errhint
(
"The arguments of json_build_object() must consist of alternating keys and values."
)));
/* translator: %s is a SQL function name */
errhint
(
"The arguments of %s must consist of alternating keys and values."
,
"json_build_object()"
)));
result
=
makeStringInfo
();
result
=
makeStringInfo
();
...
...
src/backend/utils/adt/jsonb.c
View file @
0a999e12
...
@@ -1155,7 +1155,9 @@ jsonb_build_object(PG_FUNCTION_ARGS)
...
@@ -1155,7 +1155,9 @@ jsonb_build_object(PG_FUNCTION_ARGS)
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INVALID_PARAMETER_VALUE
),
(
errcode
(
ERRCODE_INVALID_PARAMETER_VALUE
),
errmsg
(
"argument list must have even number of elements"
),
errmsg
(
"argument list must have even number of elements"
),
errhint
(
"The arguments of jsonb_build_object() must consist of alternating keys and values."
)));
/* translator: %s is a SQL function name */
errhint
(
"The arguments of %s must consist of alternating keys and values."
,
"jsonb_build_object()"
)));
memset
(
&
result
,
0
,
sizeof
(
JsonbInState
));
memset
(
&
result
,
0
,
sizeof
(
JsonbInState
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment