postgresql/src/common
Michael Paquier e41d0a1090 Add proper errcodes to new error messages for read() failures
Those would use the default ERRCODE_INTERNAL_ERROR, but for foreseeable
failures an errcode ought to be set, ERRCODE_DATA_CORRUPTED making the
most sense here.

While on the way, fix one errcode_for_file_access missing in origin.c
since the code has been created, and remove one assignment of errno to 0
before calling read(), as this was around to fit with what was present
before 811b6e36 where errno would not be set when not enough bytes are
read.  I have noticed the first one, and Tom has pinged me about the
second one.

Author: Michael Paquier
Reported-by: Tom Lane
Discussion: https://postgr.es/m/27265.1531925836@sss.pgh.pa.us
2018-07-23 09:37:36 +09:00
..
unicode Fix more wrong paths in header comments 2018-07-11 17:57:04 +03:00
base64.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
config_info.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
controldata_utils.c Add proper errcodes to new error messages for read() failures 2018-07-23 09:37:36 +09:00
exec.c Enlarge find_other_exec's meager fgets buffer 2018-04-19 10:45:15 -03:00
fe_memutils.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
file_perm.c Fix more wrong paths in header comments 2018-07-11 17:57:04 +03:00
file_utils.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
ip.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
keywords.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
md5.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_lzcompress.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgfnames.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
psprintf.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
relpath.c Further cleanup of client dependencies on src/include/catalog headers. 2018-04-09 14:39:58 -04:00
restricted_token.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
rmtree.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
saslprep.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
scram-common.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
sha2.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
sha2_openssl.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
string.c restrict -> pg_restrict 2018-03-15 10:02:59 -03:00
unicode_norm.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
username.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
wait_error.c Update copyright for 2018 2018-01-02 23:30:12 -05:00