Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cbaf72 commit 9fdb1deCopy full SHA for 9fdb1de
src/backend/commands/analyze.c
@@ -8,7 +8,7 @@
8
*
9
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.52 2003/03/23 05:14:36 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.53 2003/04/25 21:29:18 tgl Exp $
12
13
*-------------------------------------------------------------------------
14
*/
@@ -269,7 +269,8 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt)
269
else
270
{
271
attr_cnt = onerel->rd_att->natts;
272
- vacattrstats = (VacAttrStats **) palloc(attr_cnt *
+ /* +1 here is just to avoid palloc(0) with zero-column table */
273
+ vacattrstats = (VacAttrStats **) palloc((attr_cnt + 1) *
274
sizeof(VacAttrStats *));
275
tcnt = 0;
276
for (i = 1; i <= attr_cnt; i++)
0 commit comments