Thread

  1. psql Week 1

    Peter Eisentraut <peter_e@gmx.net> — 1999-10-05T18:12:29Z

    Here's the summary of my wheelings and dealings. No code yet, but trust
    me, you don't want it.
    
    * Changed one file into many
    * Changed few functions into countless
    * Added GNU long option support (added test to configure.in,
      definition to config.h.in)
      [ This feature is under protest by Tom L. ]
    * Extra arguments are now taken as dbname and username
      (it used to fail if you have more than one extra)
    * Added switch -V (--version) to display client and server version and
      warn about possible incompatibilities
    * Added \copyright command. Changed welcome message accordingly.
    * Added a few long slash commands equivalent to short ones (e.g.,
      \list = \l)
    * Rewrote backslash command parser from scratch. Can now quote
      arguments. (Only doublequotes. Single quotes to come.)
    * Added message output channel as alternative to query output and
      stderr. Might be useful to funnel output in scripts.
    * SQL command help is now generated directly from the SGML sources at
      build time.
      [ Must have perl. Might be a problem on Windows. Perhaps package
      preparsed version as well. ]
    * \connect now asks for password when appropriate
    * Added switch -U allowing you to specify username on cmd line
    * -? prints out default username, host, port, etc. in help screen
    * PSQLRC env variable can override the name of your startup script
    * PSQL_EDITOR can set your prefered editor for \e and \E (overriding
      EDITOR and VISUAL)
    * Fixed flat tire on bike ...
    * when \connect fails, it now keeps the previous connection (formerly
      aborted program)
    * Custom prompts in tcsh style
      (No, I am not partial to tcsh. In fact, I don't even use it. But
      using % as escape character rather than \ saves a lot of headaches.)
    * Increased abstraction of input routines.
      [ Cheers to Matthew D.! ]
    * Started to clean up \copy. Can now specify delimiters and "with
      oids". Still needs some work though, especially regarding binary and
      quoting/escaping. I'll probably end up writing a better strtok()
      before this is all over.
    
    More in a week . . .
    
    -- 
    Peter Eisentraut - peter_e@gmx.net
    http://yi.org/peter-e
    
    
    
  2. Re: [HACKERS] psql Week 1

    Oleg Bartunov <oleg@sai.msu.su> — 1999-10-05T21:10:21Z

    Peter,
    
    what  I miss on pgsql is ability to keep commands I issued in history file
    as bash does for example. Say, ~/.pgsqlhistory
    Of course, not to save passwords.
    
    	Regards,
    		Oleg
    
    On Tue, 5 Oct 1999, Peter Eisentraut wrote:
    
    > Date: Tue, 5 Oct 1999 20:12:29 +0200 (CEST)
    > From: Peter Eisentraut <peter_e@gmx.net>
    > To: pgsql-hackers@postgreSQL.org
    > Subject: [HACKERS] psql Week 1
    > 
    > Here's the summary of my wheelings and dealings. No code yet, but trust
    > me, you don't want it.
    > 
    > * Changed one file into many
    > * Changed few functions into countless
    > * Added GNU long option support (added test to configure.in,
    >   definition to config.h.in)
    >   [ This feature is under protest by Tom L. ]
    > * Extra arguments are now taken as dbname and username
    >   (it used to fail if you have more than one extra)
    > * Added switch -V (--version) to display client and server version and
    >   warn about possible incompatibilities
    > * Added \copyright command. Changed welcome message accordingly.
    > * Added a few long slash commands equivalent to short ones (e.g.,
    >   \list = \l)
    > * Rewrote backslash command parser from scratch. Can now quote
    >   arguments. (Only doublequotes. Single quotes to come.)
    > * Added message output channel as alternative to query output and
    >   stderr. Might be useful to funnel output in scripts.
    > * SQL command help is now generated directly from the SGML sources at
    >   build time.
    >   [ Must have perl. Might be a problem on Windows. Perhaps package
    >   preparsed version as well. ]
    > * \connect now asks for password when appropriate
    > * Added switch -U allowing you to specify username on cmd line
    > * -? prints out default username, host, port, etc. in help screen
    > * PSQLRC env variable can override the name of your startup script
    > * PSQL_EDITOR can set your prefered editor for \e and \E (overriding
    >   EDITOR and VISUAL)
    > * Fixed flat tire on bike ...
    > * when \connect fails, it now keeps the previous connection (formerly
    >   aborted program)
    > * Custom prompts in tcsh style
    >   (No, I am not partial to tcsh. In fact, I don't even use it. But
    >   using % as escape character rather than \ saves a lot of headaches.)
    > * Increased abstraction of input routines.
    >   [ Cheers to Matthew D.! ]
    > * Started to clean up \copy. Can now specify delimiters and "with
    >   oids". Still needs some work though, especially regarding binary and
    >   quoting/escaping. I'll probably end up writing a better strtok()
    >   before this is all over.
    > 
    > More in a week . . .
    > 
    > -- 
    > Peter Eisentraut - peter_e@gmx.net
    > http://yi.org/peter-e
    > 
    > 
    > ************
    > 
    
    _____________________________________________________________
    Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
    Sternberg Astronomical Institute, Moscow University (Russia)
    Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
    phone: +007(095)939-16-83, +007(095)939-23-83
    
    
    
  3. Re: [HACKERS] psql Week 1

    Bruce Momjian <maillist@candle.pha.pa.us> — 1999-10-05T21:30:37Z

    > Peter,
    > 
    > what  I miss on pgsql is ability to keep commands I issued in history file
    > as bash does for example. Say, ~/.pgsqlhistory
    > Of course, not to save passwords.
    
    readline has the capability.  We would just need to enable it.  Good
    idea.
    
    -- 
      Bruce Momjian                        |  http://www.op.net/~candle
      maillist@candle.pha.pa.us            |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  4. Re: [HACKERS] psql Week 1

    Roland Roberts <roberts@panix.com> — 1999-10-06T03:16:30Z

    -----BEGIN PGP SIGNED MESSAGE-----
    
    
        Peter> * \connect now asks for password when appropriate
    
    Does this include the initial connect?  I has password authentication
    enabled and think it would be nice if psql just prompted me rather
    than failed....
    
    roland
    - -- 
    		       PGP Key ID: 66 BC 3B CD
    Roland B. Roberts, PhD                  Custom Software Solutions
    roberts@panix.com                      76-15 113th Street, Apt 3B
    rbroberts@acm.org                          Forest Hills, NY 11375
    
    -----BEGIN PGP SIGNATURE-----
    Version: 2.6.3a
    Charset: noconv
    Comment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface
    
    iQCVAwUBN/q/B+oW38lmvDvNAQHUwwP/dLhX5AP05+v1lcpVEzx3gSK+9vWxySfx
    lK521D3fsMrWmUQOYn0mqEtLPv/bVUcYgAT+rL3L6dPdvXAHNg1rz64dmZwcsHhy
    Erm7GSH4OfCh6msNAhlF0vwgJQams+uRTbYf9AZ3UA6OBgTUCrQ3zR7Q4PSVM9O+
    +v2y2Y+FJlo=
    =hgOk
    -----END PGP SIGNATURE-----
    
    
  5. Re: [HACKERS] psql Week 1

    Matthew N. Dodd <winter@jurai.net> — 1999-10-06T04:59:21Z

    On Tue, 5 Oct 1999, Peter Eisentraut wrote:
    > * when \connect fails, it now keeps the previous connection (formerly
    >   aborted program)
    
    This is bad.
    
    Consider some process that connects to various DBs and does stuff like
    drop foo.
    
    If connect fails assume that the user no longer wanted to be connected to
    the old connection.
    
    -- 
    | Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
    | winter@jurai.net |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
    | http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |
    
    
    
  6. Re: [HACKERS] psql Week 1

    Peter Eisentraut <peter_e@gmx.net> — 1999-10-06T16:26:49Z

    On Oct 6, Oleg Bartunov mentioned:
    
    > what  I miss on pgsql is ability to keep commands I issued in history file
    > as bash does for example. Say, ~/.pgsqlhistory
    
    Consider it done. (Because it is done.)
    
    > Of course, not to save passwords.
    
    Usernames and passwords are entered through a different channel. This will
    not be a problem.
    
    -- 
    Peter Eisentraut - peter_e@gmx.net
    http://yi.org/peter-e/
    
    
    
  7. Re: [HACKERS] psql Week 1

    Peter Eisentraut <peter_e@gmx.net> — 1999-10-06T16:29:09Z

    On Oct 6, Matthew N. Dodd mentioned:
    
    > On Tue, 5 Oct 1999, Peter Eisentraut wrote:
    > > * when \connect fails, it now keeps the previous connection (formerly
    > >   aborted program)
    > 
    > This is bad.
    > 
    > Consider some process that connects to various DBs and does stuff like
    > drop foo.
    > 
    > If connect fails assume that the user no longer wanted to be connected to
    > the old connection.
    
    I forgot to mention that this only happens in interactive mode for the
    very reason you cited. I do not see a problem there.
    
    -- 
    Peter Eisentraut - peter_e@gmx.net
    http://yi.org/peter-e/