1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

TCL_ARRAYS option patches from Massimo Dal Zotto

This commit is contained in:
Tom Lane
1999-01-17 21:12:55 +00:00
parent f134a1a90a
commit 5d2cf6af9e
2 changed files with 79 additions and 36 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.35 1999/01/17 06:18:45 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.36 1999/01/17 21:12:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -699,8 +699,10 @@ array_out(ArrayType *v, Oid element_type)
for (tmp = values[i]; *tmp; tmp++)
{
overall_length += 1;
#ifndef TCL_ARRAYS
if (*tmp == '"')
overall_length += 1;
#endif
}
overall_length += 1;
}
@ -729,6 +731,7 @@ array_out(ArrayType *v, Oid element_type)
if (!typbyval)
{
strcat(p, "\"");
#ifndef TCL_ARRAYS
l = strlen(p);
for (tmp = values[k]; *tmp; tmp++)
{
@ -737,6 +740,9 @@ array_out(ArrayType *v, Oid element_type)
p[l++] = *tmp;
}
p[l] = '\0';
#else
strcat(p, values[k]);
#endif
strcat(p, "\"");
}
else