REINDEX CONCURRENTLY

This commit is contained in:
jiajunchang
2022-08-04 20:22:04 +08:00
parent 111ff9efc3
commit c5b915a5e6
29 changed files with 3509 additions and 248 deletions

View File

@ -2014,6 +2014,20 @@ static bool command_no_begin(const char* query)
return true;
if (wordlen == 10 && pg_strncasecmp(query, "tablespace", 10) == 0)
return true;
if (wordlen == 5 && (pg_strncasecmp(query, "index", 5) == 0 || pg_strncasecmp(query, "table", 5) == 0)) {
query += wordlen;
query = skip_white_space(query);
wordlen = 0;
while (isalpha((unsigned char) query[wordlen]))
wordlen += PQmblen(&query[wordlen], pset.encoding);
/*
* REINDEX [ TABLE | INDEX ] CONCURRENTLY are not allowed
* in xacts.
*/
if(wordlen == 12 && pg_strncasecmp(query, "concurrently", 12) == 0)
return true;
}
return false;
}