Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit788e799

Browse files
committed
psql: allow DROP INDEX CONCURRENTLY in AUTOCOMMIT off mode
Previously this threw an error.Patch by Feike Steenbergen
1 parentbf03889 commit788e799

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎src/bin/psql/common.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,24 @@ command_no_begin(const char *query)
16431643
return true;
16441644
if (wordlen==10&&pg_strncasecmp(query,"tablespace",10)==0)
16451645
return true;
1646+
1647+
/* DROP INDEX CONCURRENTLY isn't allowed in xacts */
1648+
if (wordlen==5&&pg_strncasecmp(query,"index",5)==0)
1649+
{
1650+
query+=wordlen;
1651+
1652+
query=skip_white_space(query);
1653+
1654+
wordlen=0;
1655+
while (isalpha((unsignedchar)query[wordlen]))
1656+
wordlen+=PQmblen(&query[wordlen],pset.encoding);
1657+
1658+
if (wordlen==12&&pg_strncasecmp(query,"concurrently",12)==0)
1659+
return true;
1660+
1661+
return false;
1662+
}
1663+
16461664
return false;
16471665
}
16481666

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp