1141 {
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
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.
Datum buffer(PG_FUNCTION_ARGS)
static int append_sql_to_buffer(STRINGBUFFER *buffer, const char *str)