This is a SCRIPT-8 cassette.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I190214 14:50:10.231918 348 util/mon/bytes_usage.go:616 [n1,client=127.0.0.1:51014,user=root] flow: now at 10240 bytes (+10240) - bytes_usage.go:550:util/mon.(*BoundAccount).Grow,builtins.go:214:sql/sem/builtins.glob..func17,eval.go:3583:sql/sem/tree.(*FuncExpr).Eval,expr.go:194:sql/distsqlrun.(*exprHelper).eval,processors.go:375:sql/distsqlrun.(*ProcOutputHelper).ProcessRow,processors.go:778:sql/distsqlrun.(*ProcessorBase).ProcessRowHelper,tablereader.go:290:sql/distsqlrun.(*tableReader).Next,base.go:175:sql/distsqlrun.Run,processors.go:801:sql/distsqlrun.(*ProcessorBase).Run,flow.go:593:sql/distsqlrun.(*Flow).startInternal.func1,asm_amd64.s:1333:runtime.goexit,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:? | |
I190214 14:50:10.232029 454 util/mon/bytes_usage.go:640 [n1,client=127.0.0.1:51014,user=root] flow: now at 0 bytes (-10240) - bytes_usage.go:512:util/mon.(*BoundAccount).Close,bytes_usage.go:499:util/mon.(*BoundAccount).Clear,flow.go:265:sql/distsqlrun.(*accountClearingRowReceiver).Push,base.go:6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
[13:09]% ./cockroach demo jordan@Termato:~/repo/src/github.com/cockroachdb/cockroach on master -> origin/master | |
# | |
# Welcome to the CockroachDB demo database! | |
# | |
# You are connected to a temporary, in-memory CockroachDB | |
# instance. Your changes will not be saved! | |
# | |
# Web UI: http://127.0.0.1:63371 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'stacktrace: {u\'frames\': [{u\'function\': u\'func4\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'pre_context\': [u\'\tif sqlServer != nil {\', u\'\t\twg.Add(1)\', u\'\t\tgo func() {\'], u\'post_context\': [u"\t\t\t// TODO(andrei): Should we sometimes transmit the writerErr\'s to the", u\'\t\t\t// client?\', u\'\t\t\twg.Done()\'], u\'filename\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'module\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).serveImpl\', u\'in_app\': True, u\'context_line\': u\'\t\t\twriterErr = sqlServer.ServeConn(ctx, connHandler, reserved, cancelConn)\', u\'lineno\': 319}, {u\'function\': u\'ServeConn\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go\', u\'pre_context\': [u\'\t\tr := recover()\', u\'\t\th.ex.closeWrapper(ctx, r)\', u\'\t}()\'], u\'post_context\': [u\'}\', u\'\', u"// sessionParams groups arguments for initializing a connExecut |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```'stacktrace: {u\'frames\': [{u\'function\': u\'func4\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'pre_context\': [u\'\tif sqlServer != nil {\', u\'\t\twg.Add(1)\', u\'\t\tgo func() {\'], u\'post_context\': [u"\t\t\t// TODO(andrei): Should we sometimes transmit the writerErr\'s to the", u\'\t\t\t// client?\', u\'\t\t\twg.Done()\'], u\'filename\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'module\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).serveImpl\', u\'in_app\': True, u\'context_line\': u\'\t\t\twriterErr = sqlServer.ServeConn(ctx, connHandler, reserved, cancelConn)\', u\'lineno\': 319}, {u\'function\': u\'ServeConn\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go\', u\'pre_context\': [u\'\t\tr := recover()\', u\'\t\th.ex.closeWrapper(ctx, r)\', u\'\t}()\'], u\'post_context\': [u\'}\', u\'\', u"// sessionParams groups arguments for initializing a connExe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
..........................#........................................................................................................................................................................................................... | |
..........................|........................................................................................................................................................................................................... | |
..........................|........................................................................................................................................................................................................... | |
..........................|........................................................................................................................................................................................................... | |
..........................|......................................................................... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
class T(object): | |
def __init__(self, n=0, lists=None): | |
self.lists = lists if lists is not None else [] | |
if lists is None: | |
# lists contains normal lists and t's as well | |
self.lists = [] | |
# cached length prefix | |
self.n = n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit | |
scrolling: true | |
height: 300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit | |
scrolling: true | |
height: 300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2 | |
binary = b'\xff\xd8\xff\xe0\x00\x10' | |
conn = psycopg2.connect('postgresql://root@localhost:26257/test?sslmode=disable') | |
with conn as conn, conn.cursor() as c: | |
c.execute('select %s::BYTEA', (binary, )) | |
rv, = c.fetchone() |