From: | Thien-Thi Nguyen <ttn(at)glug(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | 7.3.3 array_out tweak |
Date: | 2003-07-28 11:45:56 |
Message-ID: | E19h6Rw-000105-00@colo.agora-net.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
greetings,
regarding previous grousing regarding array output not being
consistently quoted, what do you think of the following patch?
it jams `nq' when the `typbyval' is not `true' on the presumption
that typbyval is a good way to distinguish numeric/non-numeric.
perhaps there is an even more direct way to discern this?
thi
___________________________________________
cd ~/local/src/postgresql-7.3.3
diff -c src/backend/utils/adt/arrayfuncs.c.ORIG src/backend/utils/adt/arrayfuncs.c
*** src/backend/utils/adt/arrayfuncs.c.ORIG Mon Jul 28 13:16:54 2003
--- src/backend/utils/adt/arrayfuncs.c Mon Jul 28 13:17:39 2003
***************
*** 663,669 ****
p = (char *) att_align(p, typalign);
/* count data plus backslashes; detect chars needing quotes */
! nq = (values[i][0] == '\0'); /* force quotes for empty string */
for (tmp = values[i]; *tmp; tmp++)
{
char ch = *tmp;
--- 663,670 ----
p = (char *) att_align(p, typalign);
/* count data plus backslashes; detect chars needing quotes */
! nq = (values[i][0] == '\0' /* force quotes for empty string */
! || typbyval != true); /* or when not by-value */
for (tmp = values[i]; *tmp; tmp++)
{
char ch = *tmp;
Diff finished at Mon Jul 28 13:36:12
From | Date | Subject | |
---|---|---|---|
Next Message | Rich Cullingford | 2003-07-28 12:02:00 | |
Previous Message | Paul Thomas | 2003-07-28 11:28:33 | Re: Where's the postgresql website atm? |