From c7f23494c1103f87bcf1ef7cbfcd626e73edb337 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 6 Jul 2011 11:45:13 -0400 Subject: Add \ir command to psql. \ir is short for "include relative"; when used from a script, the supplied pathname will be interpreted relative to the input file, rather than to the current working directory. Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further cleanup by me. --- src/bin/psql/startup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/bin/psql/startup.c') diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 7b8078c21e4..3c17eece7b8 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -256,7 +256,7 @@ main(int argc, char *argv[]) if (!options.no_psqlrc) process_psqlrc(argv[0]); - successResult = process_file(options.action_string, options.single_txn); + successResult = process_file(options.action_string, options.single_txn, false); } /* @@ -604,9 +604,9 @@ process_psqlrc_file(char *filename) sprintf(psqlrc, "%s-%s", filename, PG_VERSION); if (access(psqlrc, R_OK) == 0) - (void) process_file(psqlrc, false); + (void) process_file(psqlrc, false, false); else if (access(filename, R_OK) == 0) - (void) process_file(filename, false); + (void) process_file(filename, false, false); free(psqlrc); } -- cgit v1.2.3