Here is the Bash command to run a SQL script on a PostgreSQL server in Ubuntu Linux :
psql -U steven -d nama_database -f hapus_tinta_masuk.sql
This is a Linux terminal command to compile C++ source code:
g++ main.cpp -o my_app `pkg-config gtkmm-3.0 --cflags --libs` -lpqxx -lpq
Here is how to log in as the postgres user in Linux distributions like Arch Linux, Debian, Ubuntu, or Kali Linux. Accessing the postgres account is necessary to configure and manage your PostgreSQL server.
First, switch from your standard user account to the root user:
sudo su
Next, switch from the root account to the postgres user:
sudo su postgres
Below is the command to switch directly to the postgres user using a single command:
sudo -i -u postgres
Below is the command to view all users in a PostgreSQL server:
\du
Below is the command to view all available databases on a PostgreSQL server:
\l
Below is a SQL command for a PostgreSQL server that creates a new user named 'steven' with the password 'rahasia' and grants them permission to create databases:
CREATE USER steven WITH PASSWORD 'rahasia' CREATEDB;