Closed sleepycat closed 3 weeks ago
@sleepycat: sounds like the pgsql server is not able to recognize that SSL is disabled when using the
--set='sslmode=disable'
option. I will further explore why, but for now a quick fix is to run the following command instead:
psql "host=localhost user=immudb dbname=defaultdb password=immudb sslmode=disable" -p 5432 -f demo.sql
which works as expected.
EDIT: after further investigation, I found out that the --set
option in psql is used to set variables for use within the SQL session. These variables can be referenced in SQL scripts using the :variable_name
syntax.
In other words, it does not influence how psql
connects to the database. Setting sslmode
this way will not disable SSL
for the connection.
An alternative which also works is:
PGSSLMODE=disable psql -h localhost -d defaultdb -U immudb -p 5432 -f demo.sql
That works for me! Thanks.
What would you like to be added or enhanced
It would be useful to be able to execute a
.sql
file like you can with psql:Why is this needed This is a useful feature for quickly executing large numbers of SQL statements and is widely supported by most other databases.
Additional context
It seems that either the postgres compatibility should support this so the above
psql
command can work or some equivalent command could be added toimmuclient
. Ideally both!