mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
"char *" of course is not the same as "char []". So I had to fix the way ecpg treated the second one.
This commit is contained in:
@ -512,7 +512,14 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
|
||||
/* one index is the string length */
|
||||
if (atoi(*length) < 0)
|
||||
{
|
||||
*length = (atoi(*dimension) < 0) ? make_str("1") : *dimension;
|
||||
/* make sure we return length = -1 for arrays without given bounds */
|
||||
if (atoi(*dimension) < 0)
|
||||
*length = make_str("1");
|
||||
else if (atoi(*dimension) == 0)
|
||||
*length = make_str("-1");
|
||||
else
|
||||
*length = *dimension;
|
||||
|
||||
*dimension = make_str("-1");
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user