Re: [HACKERS] PSQL man page patch

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: martin(at)biochemistry(dot)ucl(dot)ac(dot)uk
Cc: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] PSQL man page patch
Date: 1998-01-12 15:27:46
Message-ID: 34BA3672.67D7FC13@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> ... 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-01-12 15:41:07 Re: varchar() troubles
Previous Message Bruce Momjian 1998-01-12 15:24:01 Re: varchar() troubles