19
Total Commands
100%
Free Access
⚡
Lightning Fast
Available Commands
Click on any command to copy it instantly
19 commands available
19 of 19
psql -U username -d dbnameconnection
database
ldatabase
info
dttable
info
psql -c "SELECT * FROM tablename;"query
execution
pg_dump -U username dbname > backup.sqlbackup
psql -U username dbname < backup.sqlrestore
createdb -U username dbnamedatabase
create
dropdb -U username dbnamedatabase
delete
createuser -U username usernameuser
create
dropuser -U username usernameuser
delete
CREATE TABLE tablename (column1 datatype, column2 datatype, ...);table
create
DROP TABLE tablename;table
delete
CREATE INDEX indexname ON tablename (columnname);index
create
DROP INDEX indexname;index
delete
CREATE VIEW viewname AS SELECT column1, column2, ... FROM tablename;view
create
DROP VIEW viewname;view
delete
CREATE FUNCTION functionname(arguments) RETURNS return_type AS $$ BEGIN ... END; $$ LANGUAGE plpgsql;function
create
DROP FUNCTION functionname;function
delete
CREATE TRIGGER trigger_name AFTER INSERT ON tablename FOR EACH ROW EXECUTE FUNCTION function_name();trigger
create
Missing a command?
Help us improve this collection by suggesting commands that should be added. Your contributions help the entire developer community!