diff options
author | Heikki Linnakangas | 2010-03-01 20:55:45 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2010-03-01 20:55:45 +0000 |
commit | 93df658a0189cfeda273f6efd2228578bb7933d3 (patch) | |
tree | 03011e882f34757e1b6481b6038e56998c4a3184 /src/bin/psql/print.h | |
parent | d6a6f8c6be4b6d6a9e90e92d91a83225bfe8d29d (diff) |
Fix numericlocale psql option when used with a null string and latex and troff
formats; a null string must not be formatted as a numeric. The more exotic
formats latex and troff also incorrectly formatted all strings as numerics
when numericlocale was on.
Backpatch to 8.1 where numericlocale option was added.
This fixes bug #5355 reported by Andy Lester.
Diffstat (limited to 'src/bin/psql/print.h')
-rw-r--r-- | src/bin/psql/print.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h index 9df6146d5ba..f8de2b63444 100644 --- a/src/bin/psql/print.h +++ b/src/bin/psql/print.h @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2010, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.44 2010/02/26 02:01:19 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.45 2010/03/01 20:55:45 heikki Exp $ */ #ifndef PRINT_H #define PRINT_H @@ -119,6 +119,8 @@ typedef struct printTableContent const char **cells; /* NULL-terminated array of cell content * strings */ const char **cell; /* Pointer to the last added cell */ + long cellsadded; /* Number of cells added this far */ + bool *cellmustfree; /* true for cells that need to be free()d */ printTableFooter *footers; /* Pointer to the first footer */ printTableFooter *footer; /* Pointer to the last added footer */ char *aligns; /* Array of alignment specifiers; 'l' or 'r', @@ -156,7 +158,7 @@ extern void printTableInit(printTableContent *const content, extern void printTableAddHeader(printTableContent *const content, const char *header, const bool translate, const char align); extern void printTableAddCell(printTableContent *const content, - const char *cell, const bool translate); + const char *cell, const bool translate, const bool mustfree); extern void printTableAddFooter(printTableContent *const content, const char *footer); extern void printTableSetFooter(printTableContent *const content, |