PostGIS  2.1.10dev-r@@SVN_REVISION@@
static int vacuum_table ( const char *  schema,
const char *  table,
STRINGBUFFER buffer 
)
static

Definition at line 1127 of file raster2pgsql.c.

References _, append_sql_to_buffer(), rtalloc(), rtdealloc(), rterror(), and rtgdalraster::sql.

Referenced by process_rasters().

1130  {
1131  char *sql = NULL;
1132  uint32_t len = 0;
1133 
1134  assert(table != NULL);
1135 
1136  len = strlen("VACUUM ANALYZE ;") + 1;
1137  if (schema != NULL)
1138  len += strlen(schema);
1139  len += strlen(table);
1140 
1141  sql = rtalloc(sizeof(char) * len);
1142  if (sql == NULL) {
1143  rterror(_("vacuum_table: Could not allocate memory for VACUUM statement"));
1144  return 0;
1145  }
1146  sprintf(sql, "VACUUM ANALYZE %s%s;",
1147  (schema != NULL ? schema : ""),
1148  table
1149  );
1150 
1151  append_sql_to_buffer(buffer, sql);
1152  rtdealloc(sql);
1153 
1154  return 1;
1155 }
void rtdealloc(void *mem)
Definition: rt_api.c:882
#define _(String)
Definition: shpcommon.h:23
static int append_sql_to_buffer(STRINGBUFFER *buffer, const char *str)
Definition: raster2pgsql.c:820
void * rtalloc(size_t size)
Raster core memory management functions.
Definition: rt_api.c:867
void rterror(const char *fmt,...)
Raster core error and info handlers.
Definition: rt_api.c:895

Here is the call graph for this function:

Here is the caller graph for this function: