Is there a psql client config file analogous to $HOME/my.cnf for mysql ? [closed] - postgresql

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
That is, a local file on the client machine with default "host", "port", "user" values, etc., so that I don't have to enter them on the command line each time?

Use the password file with lines like:
hostname:port:database:username:password
If you always log into the same host:db:port:user then this will make it:
*:*:*:*:mypassword

You can either define one (or several ) alias to psql with the proper arguments for user, database, host. Or set some environment values.

Related

Powershell solution required [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 days ago.
Improve this question
I have many text files in directory and sub directories. I want to add a Tab character before Device_Id but line must not contain Sender_Ip.
Device_Id is present in both lines either it's having Sender_Ip or not. I could replace Tab character but had replaced in both types of lines whereas I just want it to be replaced where Sende_Ip is not present.

How to keep function variable in workspace to avoid load .mat file repeatedly in matlab? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
function A(B,C)
load d.mat
my code
end
Is there a way that I can use d.mat file without load/import it. Or is there a way that do not need to load/import d.mat file every time I run function A.
You can pass the variable/content of d.mat as an extra parameter to the function A.

Replace the mixed pattern with preg_replace() on a directory path string [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to remove "Documents/1/project/1/sub/15/"
from the whole text srting
"Documents/1/project/1/sub/15/Project 1_1/2012-09-10/0a/0ad0175615742c7a3142cd0ecc4c3277/19-50-24-10233310.txt"
But the numbers 1,1 and 15 will not be same always.It will change.
Desired result : "Project 1_1/2012-09-10/0a/0ad0175615742c7a3142cd0ecc4c3277/19-50-24-10233310.txt"
Solved it.
preg_replace('/(Documents/.+?)+(/project/.+?)+(/sub/.+?)+(/)/i','',$str)

Arch Linux - How to pass arguments to daemon in rc.conf [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
If I add a daemon to rc.conf, how can I then pass arguments to it?
Eg
DAEMONS = (sshd mongodb ...)
How can I pass --replSet to the mongodb daemon?
You should try to set this behaviour in /etc/mongodb.conf
I don't think you pass anything, it calls the daemon from /etc/rc.d/ so you'd edit that script with the args.
EDIT: here are some links that explain:
https://wiki.archlinux.org/index.php/Rc.conf#Daemons
https://wiki.archlinux.org/index.php/Writing_rc.d_scripts

Is there a free pgp key dumping program? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
is there any pgp key dumping program like http://www.pgpdump.net/ that also shows the MPI values as well as the other information? the linked website's program will print out ... for the long MPI, which is perfectly logical, but I want to see the values since my program is for some reason getting all but one part right (reading an elgamal public key), and its messing with everything that comes afterwards. i want to see where im off by a few bits
gpg --list-packets --debug-all should show MPI values.
pgpdump.net links to the source code of pgpdump. Perhaps you could find the part where ... is written and change it in a local copy of the program.