1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Use standard macro for psql binary file open. Add comment explaining

control-z requirement.
This commit is contained in:
Bruce Momjian
2004-07-11 13:29:16 +00:00
parent c8c40bbc9e
commit 98e9775a3a
5 changed files with 16 additions and 21 deletions

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.118 2004/07/11 00:54:55 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.119 2004/07/11 13:29:15 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@ -1197,7 +1197,7 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf)
if (!error)
{
#endif
stream = fopen(fname, R_TEXTFILE);
stream = fopen(fname, PG_BINARY_R);
if (!stream)
{
psql_error("%s: %s\n", fname, strerror(errno));
@ -1262,7 +1262,7 @@ process_file(char *filename)
if (!filename)
return false;
fd = fopen(filename, R_TEXTFILE);
fd = fopen(filename, PG_BINARY_R);
if (!fd)
{