Thread

  1. Re: [HACKERS] PSQL man page patch

    Andrew Martin <martin@biochemistry.ucl.ac.uk> — 1998-01-12T14:58:03Z

    > OK, we never installed this for 6.2 because we were already in Beta. 
    > Can we do this for 6.3?  Vadim suggested we make this part of libpq, so
    > all applications could make use of it.
    > 
    > I have one of the original patches, but not the others. Martin, what do you
    > think?  Any other comments on this?
    > 
    > 
    > > 
    > > 
    > > adding them to the documentation, I thought I'd better supply
    > > a patch to the psql man page which documents the .psqlrc file :-)
    > > (I forgot yesterday....)
    > > 
    > > 
    > > Andrew
    > > 
    > > 
    [DELETED patch to man page for psql.1 which documents suggested addition
    of support for a /etc/psqlrc and/or $(HOME)/.psqlrc containing SQL code
    to be run whenever psql is started]
    
    Personally, I think this should just be a function of psql not libpq - it's
    really there as a convenience to the person running psql to save typing a
    few lines of SQL every time (like setting the date format). If you are
    running PG/SQL via some other interface (such as Perl), then it is
    trivial to write those few lines as part of your Perl script rather than
    in a .psqlrc file.
    
    I still have the patch file for the source as well as for the man page
    
    
    Andrew
    
    ----------------------------------------------------------------------------
    Dr. Andrew C.R. Martin                             University College London
    EMAIL: (Work) martin@biochem.ucl.ac.uk    (Home) andrew@stagleys.demon.co.uk
    URL:   http://www.biochem.ucl.ac.uk/~martin
    Tel:   (Work) +44(0)171 419 3890                    (Home) +44(0)1372 275775
    
    
  2. Re: [HACKERS] PSQL man page patch

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 1998-01-12T15:27:46Z

    > ... patch to man page for psql.1 which documents suggested addition
    > of support for a /etc/psqlrc and/or $(HOME)/.psqlrc containing SQL code
    > to be run whenever psql is started]
    >
    > Personally, I think this should just be a function of psql not libpq - it's
    > really there as a convenience to the person running psql to save typing a
    > few lines of SQL every time (like setting the date format). If you are
    > running PG/SQL via some other interface (such as Perl), then it is
    > trivial to write those few lines as part of your Perl script rather than
    > in a .psqlrc file.
    
    I have added support for PGTZ to libpq and fixed the existing PGDATESTYLE
    support, so at least a few common environment settings will not need .psqlrc.
    The bigger problem is that .psqlrc could contain commands which might screw up
    an embedded application. For example. a query to show the current time in
    .psqlrc would result in an unexpected response from the backend as an app fires
    up. It does seem like a nice feature for at least psql though, as Andrew
    suggests. I'd suggest that if we add it to libpq that we do so as a separate
    call or an option, so an embedded app can choose to use it or not.
    
                                                          - Tom
    
    > I still have the patch file for the source as well as for the man page