How to change psql default listening host?
How about an alias for psql?
alias psql="psql --host localhost"
Alternatively you could set the PGHOST environment variable.
rowanphilip
Updated on September 17, 2022Comments
-
rowanphilip over 1 year
My program has to search through a CSV file line by line and if a unique item is found, another form needs to be opened asking the user for more information on this item to store in a file before continuing to search the CSV file. I have browsed around looking for an answer and the only thing that I can find is showmodal which closes the pop-up form after it's finished. I need to keep the form open in case there is another unique item. I have also tried having a repeat, until loop which repeats until the value of a certain variable is changed by the pop-up form, allowing the program to continue when the pop-up form is hidden. This, however, does not seem to work and causes the pop-up form to be blank and unusable. Help please!
-
David Heffernan over 10 yearsPut the long running code in a thread.
-
Andy_D over 10 yearsIs the user's input critical to continuing the processing and is future processing dependent upon previous user input?
-
-
shahjapan over 13 yearsIt may work but its not concrete solution, I want to know something solid like what's default value of --host and from which config. file I can alter the host name.
-
Joril over 13 yearsPsql does read ~/.psqlrc on startup, but it looks like you can only use it to configure the connection, not the login itself...
-
Joril over 13 yearsThere's PGHOST too.. Modified the answer
-
rowanphilip over 10 yearsThe "Modal" itself Actually stores the item(s) in the file and is a fairly complex form. It can't just be a message dialog. How do I use the modal method but be able to use this form again?
-
Arioch 'The over 10 yearsdo not free/dispose/release the form after ShowModal, then you can change all the properties you need to change and ShowModal again
-
Arioch 'The over 10 yearsalso if the form has OnClose event ensure it chooses "hide" action instead of destroying itself