aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 8abadb26c49..6ead800aeb1 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -2043,9 +2043,11 @@ process_file(char *filename, bool single_txn, bool use_relative_path)
PGresult *res;
if (!filename)
- return EXIT_FAILURE;
-
- if (strcmp(filename, "-") != 0)
+ {
+ fd = stdin;
+ filename = NULL;
+ }
+ else if (strcmp(filename, "-") != 0)
{
canonicalize_path(filename);