Ð ÐÐÑ, 28.08.2004, Ð 21:33, Joe Conway ÐÐÑÐÑ:

>       /* special case for an empty array */
> !     if (strcmp(str, "{}") == 0)
>               return 0;

Without looking at the code in a whole, you accept '{} ' as an empty
array literal, so why is the special case for '{}' needed here? I should
be catched by the code that accepts additional whitespace after the last
closing brace, just that there is no white space:

> +     /* only whitespace is allowed after the closing brace */
> +     while (*ptr)
> +     {
> +             if (!isspace(*ptr++))
> +                     ereport(ERROR,
> +                             (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
> +                             errmsg("malformed array literal: \"%s\"", str)));
> +     }
> +     
> +     /* special case for an empty array */
> +     if (empty_array)
> +             return 0;

Here's the second special case for empty arrays.

-- 
Markus Bertheau <[EMAIL PROTECTED]>


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to