diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-07-06 11:45:13 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-07-06 11:45:13 -0400 |
commit | c7f23494c1103f87bcf1ef7cbfcd626e73edb337 (patch) | |
tree | 7986492776b72dae25a10615076658879440aa03 /src/bin/psql/startup.c | |
parent | 5ac6b767893281cab5c974b039400118851d548b (diff) | |
download | postgresql-c7f23494c1103f87bcf1ef7cbfcd626e73edb337.tar.gz postgresql-c7f23494c1103f87bcf1ef7cbfcd626e73edb337.zip |
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.
Diffstat (limited to 'src/bin/psql/startup.c')
-rw-r--r-- | src/bin/psql/startup.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |