diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-05-15 01:57:33 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-05-15 01:57:33 +0000 |
commit | 45878915a89bbd338ccb7e4b5b55f4344186df05 (patch) | |
tree | 692b20a375b34428acdc3f7865125f492dc49331 | |
parent | 683333644d1ca374e208a2174910c42e19134b1e (diff) | |
download | postgresql-45878915a89bbd338ccb7e4b5b55f4344186df05.tar.gz postgresql-45878915a89bbd338ccb7e4b5b55f4344186df05.zip |
Another \f\ fix for psql.
-rw-r--r-- | src/bin/psql/psql.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index 0542d3951e9..e698f68fb53 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.143 1998/05/13 03:27:07 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.144 1998/05/15 01:57:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1988,8 +1988,16 @@ HandleSlashCmds(PsqlSettings *pset, if (optarg) fs = optarg; - if (optarg && !*optarg && strlen(cmd) > 2) - fs = cmd + 2; + /* handle \f \{space} */ + if (optarg && !*optarg && strlen(cmd) > 1) + { + int i; + + /* line and cmd match until the first blank space */ + for (i=2; isspace(line[i]); i++) + ; + fs = cmd + i - 1; + } if (pset->opt.fieldSep) free(pset->opt.fieldSep); if (!(pset->opt.fieldSep = strdup(fs))) |