Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Location
    Orlando, FL
    Posts
    311
    Provided Answers: 1

    Question Unanswered: Disable PSQL History Hidden File?

    I noticed that when I am done using 'psql' as my superuser account, there's always a '.psql_history' file in my user's home directory. Now I've made all the precautions to make sure that nobody but me can access my home directory but I find it very disturbing that my commands and passwords for PostgreSQL are listed in plain text via this one text file. Is there a way to stop this? I don't know if this is done via Linux shell or PostgreSQL program itself that generates the file.

    Anyone know if it's possible to omit the '.psql_history' file?

  2. #2
    Join Date
    Nov 2006
    Posts
    82
    You can create a file .psqlrc and define there

    Code:
    \set HISTFILE /dev/null
    file is read when you start psql client.

  3. #3
    Join Date
    Oct 2010
    Location
    Orlando, FL
    Posts
    311
    Provided Answers: 1
    Thanks. I'll give that a shot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •