7.3.3 array_out tweak
От | Thien-Thi Nguyen |
---|---|
Тема | 7.3.3 array_out tweak |
Дата | |
Msg-id | E19h6Rw-000105-00@colo.agora-net.com обсуждение исходный текст |
Ответы |
Re: 7.3.3 array_out tweak
|
Список | 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
В списке pgsql-general по дате отправления: