# HG changeset patch # User Catherine Devlin # Date 1239739919 14400 # Node ID 80a1976decf2b825f6e20a1f1b4fdb4fd6e0f964 # Parent a8835fe129f66f818d4394a9fa3da4978cba1437 no changes i hope diff -r a8835fe129f6 -r 80a1976decf2 docs/source/capabilities.rst --- a/docs/source/capabilities.rst Thu Apr 09 00:15:09 2009 -0400 +++ b/docs/source/capabilities.rst Tue Apr 14 16:11:59 2009 -0400 @@ -223,6 +223,40 @@ \\di _dir_indexes \\? help psql ===== =================== + +Multiple sessions +================= + +When the `-a` flag is used with the `connect` or `\c` command, the new connection +is in addition to the old connection. `connect -a {username@instance}` is used to create a new connection, senora does not close the +old connection. It keeps both connections alive, and switching between them is far more convenient +than creating new connections:: + + 0:jrrt@orcl> connect -a scott/tiger@orcl + 1:scott@orcl> select * from dept; + + DEPTNO DNAME LOC + ------ ---------- -------- + 10 ACCOUNTING NEW YORK + 20 RESEARCH DALLAS + 30 SALES CHICAGO + 40 OPERATIONS BOSTON + + 4 rows selected. + + 1:scott@orcl> 0:select * from party; + + NAME STR INT WIS DEX CON CHA + ------- --- --- --- --- --- --- + Frodo 8 14 16 15 14 16 + Gimli 17 12 10 11 17 11 + Legolas 13 15 14 18 15 17 + Sam 11 9 14 11 16 13 + + 4 rows selected. + + 1:scott@orcl> 0: + 0:jrrt@orcl> Bind variables ============== diff -r a8835fe129f6 -r 80a1976decf2 docs/source/comparison.rst --- a/docs/source/comparison.rst Thu Apr 09 00:15:09 2009 -0400 +++ b/docs/source/comparison.rst Tue Apr 14 16:11:59 2009 -0400 @@ -476,7 +476,30 @@ old connection. It keeps both connections alive, and switching between them is far more convenient than creating new connections:: - Enter sample here + 0:jrrt@orcl> connect -a scott/tiger@orcl + 1:scott@orcl> select * from dept; + + DEPTNO DNAME LOC + ------ ---------- -------- + 10 ACCOUNTING NEW YORK + 20 RESEARCH DALLAS + 30 SALES CHICAGO + 40 OPERATIONS BOSTON + + 4 rows selected. + + 1:scott@orcl> 0:select * from party; + + NAME STR INT WIS DEX CON CHA + ------- --- --- --- --- --- --- + Frodo 8 14 16 15 14 16 + Gimli 17 12 10 11 17 11 + Legolas 13 15 14 18 15 17 + Sam 11 9 14 11 16 13 + + 4 rows selected. + + 1:scott@orcl> 0: psql-like shortcuts -------------------