You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When talking to a local database the most convenient option is to use local socket. No need for opening IP ports or password management, user access is controlled by kernel. Reasonable defaults are used by standard PostgreSQL client implementation, so no URL, hostname, port, username or even database name needs to be provided (when using local connection, default port, current logged-in user name and the database named after the user name):
jajcus@jajco:~$ psql
psql (14.12 (Ubuntu 14.12-0ubuntu0.22.04.1))
Type "help" for help.
jajcus=#
I would expect the same (or similar) experience by any PotgreSQL client, but this is not the case with sql-studio:
jajcus@jajco:~$ sql-studio postgres
error: the following required arguments were not provided:
<URL>
Usage: sql-studio postgres <URL>
For more information, try '--help'.
jajcus@jajco:~$ sql-studio postgres postgresql:///
Error:
0: invalid configuration: both host and hostaddr are missing
1: both host and hostaddr are missing
Location:
src/main.rs:982
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
jajcus@jajco:~$ sql-studio postgres postgresql:///jajcus
Error:
0: invalid configuration: both host and hostaddr are missing
1: both host and hostaddr are missing
Location:
src/main.rs:982
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Is it even possible to connect to the database via local socket? What is the expected URL format in this case? E.g. postgresql:///jajcus works for sqlx.
BTW, requiring postgres command before a postgresql: URL is also a weird CLI choice – the URL already implies the database type – that is the very idea of using 'URLs' for database access.
The text was updated successfully, but these errors were encountered:
When talking to a local database the most convenient option is to use local socket. No need for opening IP ports or password management, user access is controlled by kernel. Reasonable defaults are used by standard PostgreSQL client implementation, so no URL, hostname, port, username or even database name needs to be provided (when using local connection, default port, current logged-in user name and the database named after the user name):
I would expect the same (or similar) experience by any PotgreSQL client, but this is not the case with sql-studio:
Is it even possible to connect to the database via local socket? What is the expected URL format in this case? E.g.
postgresql:///jajcus
works for sqlx.BTW, requiring
postgres
command before apostgresql:
URL is also a weird CLI choice – the URL already implies the database type – that is the very idea of using 'URLs' for database access.The text was updated successfully, but these errors were encountered: