diff options
author | Marc G. Fournier | 1996-08-14 16:44:51 +0000 |
---|---|---|
committer | Marc G. Fournier | 1996-08-14 16:44:51 +0000 |
commit | bde34552a279a13a7980049455d6a79951cc5c5d (patch) | |
tree | fb986d8024ffb552b4bfeea64a93c083b3d73250 | |
parent | 476ef109133b1e062c2805d4932ef331dda84a68 (diff) |
|Here is a fix for the psql alignment problem. It turns out that libpq
|was trying to determine if the column contained only numeric values so
|it could right justify it. The 'e' values were taked as exponient
|values and all columns were considered numeric.
|
|The patch excludes 'e' and 'E' as being valid first-column numeric
|values.
|
Submitted by: Bruce...
-rw-r--r-- | src/interfaces/libpq/fe-exec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index a1586bb64c3..a1e0bee2402 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.16 1996/08/14 04:56:55 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.17 1996/08/14 16:44:51 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -999,7 +999,8 @@ PQprint(FILE *fout, { if ((fs_len==1 && (*p==*(po->fieldSep))) || *p=='\\') *(o++)='\\'; - if (po->align && !((*p >='0' && *p<='9') || *p=='.' || *p=='E' || *p=='e' || *p==' ' || *p=='-')) + if (po->align && (*pval=='E' || *pval=='e' || + !((*p>='0' && *p<='9') || *p=='.' || *p=='E' || *p=='e' || *p==' ' || *p=='-'))) fieldNotNum[j]=1; } *o='\0'; |