diff options
| author | Peter Eisentraut | 2000-01-19 20:08:36 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2000-01-19 20:08:36 +0000 |
| commit | 65e00518431652be36cfa676a3e216315e4dd659 (patch) | |
| tree | 46b69f69ee3a557bff33c29a22f2c14b92286bc9 /src/bin/psql/startup.c | |
| parent | ea1f6e00e65ad9b519379a2b3dcdcbf5414c22de (diff) | |
another round of user interface cleanups
removed pg_id
fixed a few bugs in the scripts
Diffstat (limited to 'src/bin/psql/startup.c')
| -rw-r--r-- | src/bin/psql/startup.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 1c31cb47563..4c16dae9d7e 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Team * - * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.16 2000/01/18 23:30:24 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.17 2000/01/19 20:08:34 petere Exp $ */ #include <c.h> @@ -205,10 +205,18 @@ main(int argc, char **argv) successResult = process_file(options.action_string) ? 0 : 1; /* process slash command if one was given to -c */ else if (options.action == ACT_SINGLE_SLASH) + { + if (GetVariable(pset.vars, "ECHO") && strcmp(GetVariable(pset.vars, "ECHO"), "full")==0) + puts(options.action_string); successResult = HandleSlashCmds(options.action_string, NULL, NULL) != CMD_ERROR ? 0 : 1; + } /* If the query given to -c was a normal one, send it */ else if (options.action == ACT_SINGLE_QUERY) + { + if (GetVariable(pset.vars, "ECHO") && strcmp(GetVariable(pset.vars, "ECHO"), "full")==0) + puts(options.action_string); successResult = SendQuery( options.action_string) ? 0 : 1; + } /* or otherwise enter interactive main loop */ else { |
