aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-03-15 12:55:51 +0900
committerMichael Paquier <michael@paquier.xyz>2023-03-15 12:55:51 +0900
commit765f5df726918bcdcfd16bcc5418e48663d1dd59 (patch)
tree441d40c3a43cd6cf1ddcf69cbf235d45add8f620 /src/backend/parser/parse_expr.c
parent89e46da5e511a6970e26a020f265c9fb4b72b1d2 (diff)
downloadpostgresql-765f5df726918bcdcfd16bcc5418e48663d1dd59.tar.gz
postgresql-765f5df726918bcdcfd16bcc5418e48663d1dd59.zip
Improve WIN32 port of fstat() to detect more file types
The current implementation of _pgfstat64() is ineffective in detecting a terminal handle or an anonymous named pipe. This commit improves our port of fstat() to detect more efficiently such cases by relying on GetFileType(), and returning more correct data when the type found is either a FILE_TYPE_PIPE (_S_IFIFO) or a FILE_TYPE_CHAR (_S_IFCHR). This is part of a more global fix to address failures when feeding the output generated by pg_dump to pg_restore through a pipe, for example, but not all of it. We are also going to need to do something about fseek() and ftello() which are not reliable on WIN32 for the same cases where fstat() was incorrect. Fixing fstat() is independent of the rest, though, which is why both fixes are handled separately, and this is the first part of it. Reported-by: Daniel Watzinger Author: Daniel Watzinger, Juan José Santamaría Flecha Discussion: https://postgr.es/m/b1448cd7-871e-20e3-8398-895e2d1d3bf9@gmail.com Backpatch-through: 14
Diffstat (limited to 'src/backend/parser/parse_expr.c')
0 files changed, 0 insertions, 0 deletions