github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/pgwire/testdata/pgtest/portals_crbugs (about) 1 # This file tests behavior that differs from Postgres wrt portal 2 # handling. That is, the -rewrite flag, when used with Postgres, will 3 # produce different results than Cockroach. 4 5 only crdb 6 ---- 7 8 # More behavior that differs from postgres. Try executing a new query 9 # when a portal is suspended. Cockroach errors. 10 11 send 12 Query {"String": "BEGIN"} 13 Parse {"Query": "SELECT * FROM generate_series(1, 2)"} 14 Bind 15 Execute {"MaxRows": 1} 16 Query {"String": "SELECT 1"} 17 Sync 18 ---- 19 20 until keepErrMessage 21 ReadyForQuery 22 ErrorResponse 23 ReadyForQuery 24 ReadyForQuery 25 ---- 26 {"Type":"CommandComplete","CommandTag":"BEGIN"} 27 {"Type":"ReadyForQuery","TxStatus":"T"} 28 {"Type":"ParseComplete"} 29 {"Type":"BindComplete"} 30 {"Type":"DataRow","Values":[{"text":"1"}]} 31 {"Type":"PortalSuspended"} 32 {"Type":"ErrorResponse","Code":"0A000","Message":"unimplemented: multiple active portals not supported"} 33 {"Type":"ReadyForQuery","TxStatus":"E"} 34 {"Type":"ReadyForQuery","TxStatus":"E"} 35 36 send 37 Query {"String": "ROLLBACK"} 38 Query {"String": "SELECT 'here'"} 39 ---- 40 41 until ignore=RowDescription 42 ReadyForQuery 43 ReadyForQuery 44 ---- 45 {"Type":"CommandComplete","CommandTag":"ROLLBACK"} 46 {"Type":"ReadyForQuery","TxStatus":"I"} 47 {"Type":"DataRow","Values":[{"text":"here"}]} 48 {"Type":"CommandComplete","CommandTag":"SELECT 1"} 49 {"Type":"ReadyForQuery","TxStatus":"I"} 50 51 # Also try binding another portal during suspension. 52 53 send 54 Query {"String": "BEGIN"} 55 Parse {"Query": "SELECT * FROM generate_series(1, 2)"} 56 Bind 57 Execute {"MaxRows": 1} 58 Bind 59 Sync 60 ---- 61 62 until keepErrMessage 63 ReadyForQuery 64 ErrorResponse 65 ReadyForQuery 66 ---- 67 {"Type":"CommandComplete","CommandTag":"BEGIN"} 68 {"Type":"ReadyForQuery","TxStatus":"T"} 69 {"Type":"ParseComplete"} 70 {"Type":"BindComplete"} 71 {"Type":"DataRow","Values":[{"text":"1"}]} 72 {"Type":"PortalSuspended"} 73 {"Type":"ErrorResponse","Code":"0A000","Message":"unimplemented: multiple active portals not supported"} 74 {"Type":"ReadyForQuery","TxStatus":"E"} 75 76 send 77 Query {"String": "ROLLBACK"} 78 Query {"String": "SELECT 'here'"} 79 ---- 80 81 until ignore=RowDescription 82 ReadyForQuery 83 ReadyForQuery 84 ---- 85 {"Type":"CommandComplete","CommandTag":"ROLLBACK"} 86 {"Type":"ReadyForQuery","TxStatus":"I"} 87 {"Type":"DataRow","Values":[{"text":"here"}]} 88 {"Type":"CommandComplete","CommandTag":"SELECT 1"} 89 {"Type":"ReadyForQuery","TxStatus":"I"}