PostGIS 3.7.0dev-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 1138 of file raster2pgsql.c.

1141 {
1142 char *sql = NULL;
1143 uint32_t len = 0;
1144
1145 assert(table != NULL);
1146
1147 len = strlen("VACUUM ANALYZE ;") + 1;
1148 if (schema != NULL)
1149 len += strlen(schema);
1150 len += strlen(table);
1151
1152 sql = rtalloc(sizeof(char) * len);
1153 if (sql == NULL) {
1154 rterror(_("vacuum_table: Could not allocate memory for VACUUM statement"));
1155 return 0;
1156 }
1157 sprintf(sql, "VACUUM ANALYZE %s%s;",
1158 (schema != NULL ? schema : ""),
1159 table
1160 );
1161
1163
1164 return 1;
1165}
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
void * rtalloc(size_t size)
Wrappers used for managing memory.
Definition rt_context.c:191
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: