mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Create real array comparison functions (that use the element datatype's
comparison functions), replacing the highly bogus bitwise array_eq. Create a btree index opclass for ANYARRAY --- it is now possible to create indexes on array columns. Arrange to cache the results of catalog lookups across multiple array operations, instead of repeating the lookups on every call. Add string_to_array and array_to_string functions. Remove singleton_array, array_accum, array_assign, and array_subscript functions, since these were for proof-of-concept and not intended to become supported functions. Minor adjustments to behavior in some corner cases with empty or zero-dimensional arrays. Joe Conway (with some editorializing by Tom Lane).
This commit is contained in:
@ -436,7 +436,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
|
||||
if (atoi(type_index) >= 0)
|
||||
{
|
||||
if (atoi(*length) >= 0)
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support");
|
||||
|
||||
*length = type_index;
|
||||
}
|
||||
@ -444,7 +444,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
|
||||
if (atoi(type_dimension) >= 0)
|
||||
{
|
||||
if (atoi(*dimension) >= 0 && atoi(*length) >= 0)
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support");
|
||||
|
||||
if (atoi(*dimension) >= 0)
|
||||
*length = *dimension;
|
||||
@ -463,10 +463,10 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No pointer to pointer supported for this type");
|
||||
|
||||
if (pointer_len > 1 && (atoi(*length) >= 0 || atoi(*dimension) >= 0))
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support");
|
||||
|
||||
if (atoi(*length) >= 0 && atoi(*dimension) >= 0 && pointer_len)
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support");
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support");
|
||||
|
||||
switch (type_enum)
|
||||
{
|
||||
@ -480,7 +480,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
|
||||
}
|
||||
|
||||
if (atoi(*length) >= 0)
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support for structures");
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support for structures");
|
||||
|
||||
break;
|
||||
case ECPGt_varchar:
|
||||
@ -525,7 +525,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
|
||||
}
|
||||
|
||||
if (atoi(*length) >= 0)
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multi-dimensional array support for simple data types");
|
||||
mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support for simple data types");
|
||||
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user