Re: [SQL] array_in: '{}}'::text[]
От | Markus Bertheau |
---|---|
Тема | Re: [SQL] array_in: '{}}'::text[] |
Дата | |
Msg-id | 1093723759.2732.16.camel@teetnang обсуждение исходный текст |
Ответ на | Re: [SQL] array_in: '{}}'::text[] (Joe Conway <mail@joeconway.com>) |
Ответы |
Re: [SQL] array_in: '{}}'::text[]
|
Список | pgsql-patches |
В Сбт, 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 <twanger@bluetwanger.de>
В списке pgsql-patches по дате отправления: