mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Fixed test for array boundary.
Instead of continuing if the next character is not an array boundary get_data() used to continue only on finding a boundary so it was not able to read any element after the first.
This commit is contained in:
		@@ -422,6 +422,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
 | 
				
			|||||||
							ecpg_raise(lineno, ECPG_CONVERT_BOOL,
 | 
												ecpg_raise(lineno, ECPG_CONVERT_BOOL,
 | 
				
			||||||
									   ECPG_SQLSTATE_DATATYPE_MISMATCH,
 | 
														   ECPG_SQLSTATE_DATATYPE_MISMATCH,
 | 
				
			||||||
									   NULL);
 | 
														   NULL);
 | 
				
			||||||
 | 
											pval++;
 | 
				
			||||||
						break;
 | 
											break;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					else if (pval[0] == 't' && pval[1] == '\0')
 | 
										else if (pval[0] == 't' && pval[1] == '\0')
 | 
				
			||||||
@@ -434,6 +435,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
 | 
				
			|||||||
							ecpg_raise(lineno, ECPG_CONVERT_BOOL,
 | 
												ecpg_raise(lineno, ECPG_CONVERT_BOOL,
 | 
				
			||||||
									   ECPG_SQLSTATE_DATATYPE_MISMATCH,
 | 
														   ECPG_SQLSTATE_DATATYPE_MISMATCH,
 | 
				
			||||||
									   NULL);
 | 
														   NULL);
 | 
				
			||||||
 | 
											pval++;
 | 
				
			||||||
						break;
 | 
											break;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field))
 | 
										else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field))
 | 
				
			||||||
@@ -777,7 +779,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
 | 
				
			|||||||
					++pval;
 | 
										++pval;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} while (*pval != '\0' && array_boundary(isarray, *pval));
 | 
						} while (*pval != '\0' && !array_boundary(isarray, *pval));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return (true);
 | 
						return (true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user