diff --git a/asyncpg/prepared_stmt.py b/asyncpg/prepared_stmt.py index 8e241d67..195d0056 100644 --- a/asyncpg/prepared_stmt.py +++ b/asyncpg/prepared_stmt.py @@ -147,8 +147,8 @@ async def explain(self, *args, analyze=False): # will discard any output that a SELECT would return, other # side effects of the statement will happen as usual. If you # wish to use EXPLAIN ANALYZE on an INSERT, UPDATE, DELETE, - # CREATE TABLE AS, or EXECUTE statement without letting the - # command affect your data, use this approach: + # MERGE, CREATE TABLE AS, or EXECUTE statement without letting + # the command affect your data, use this approach: # BEGIN; # EXPLAIN ANALYZE ...; # ROLLBACK; diff --git a/asyncpg/protocol/prepared_stmt.pyx b/asyncpg/protocol/prepared_stmt.pyx index 7335825c..cb0afa24 100644 --- a/asyncpg/protocol/prepared_stmt.pyx +++ b/asyncpg/protocol/prepared_stmt.pyx @@ -142,7 +142,7 @@ cdef class PreparedStatementState: # that the user tried to parametrize a statement that does # not support parameters. hint += (r' Note that parameters are supported only in' - r' SELECT, INSERT, UPDATE, DELETE, and VALUES' + r' SELECT, INSERT, UPDATE, DELETE, MERGE and VALUES' r' statements, and will *not* work in statements ' r' like CREATE VIEW or DECLARE CURSOR.') diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index dbffcc2d..e8bb7a1d 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -42,7 +42,7 @@ async def test_exceptions_str(self): self.assertEqual( e.detail, "Function's final statement must be SELECT or " - "INSERT/UPDATE/DELETE RETURNING.") + "INSERT/UPDATE/DELETE/MERGE RETURNING.") self.assertIn( 'DETAIL: Function', str(e) )