PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ vacuum_table()

static int vacuum_table ( const char *  schema,
const char *  table,
STRINGBUFFER buffer 
)
static

Definition at line 1126 of file raster2pgsql.c.

1129 {
1130 char *sql = NULL;
1131 uint32_t len = 0;
1132
1133 assert(table != NULL);
1134
1135 len = strlen("VACUUM ANALYZE ;") + 1;
1136 if (schema != NULL)
1137 len += strlen(schema);
1138 len += strlen(table);
1139
1140 sql = rtalloc(sizeof(char) * len);
1141 if (sql == NULL) {
1142 rterror(_("vacuum_table: Could not allocate memory for VACUUM statement"));
1143 return 0;
1144 }
1145 sprintf(sql, "VACUUM ANALYZE %s%s;",
1146 (schema != NULL ? schema : ""),
1147 table
1148 );
1149
1151
1152 return 1;
1153}
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
Definition rt_context.c:199
void * rtalloc(size_t size)
Wrappers used for managing memory.
Definition rt_context.c:171
Datum buffer(PG_FUNCTION_ARGS)
static int append_sql_to_buffer(STRINGBUFFER *buffer, const char *str)
#define _(String)
Definition shpcommon.h:24

References _, append_sql_to_buffer(), buffer(), rtalloc(), and rterror().

Referenced by process_rasters().

Here is the call graph for this function:
Here is the caller graph for this function: