PostgreSql Commands

 ---to enter from command line terminal

$sudo -u postgres psql

--asks for password



Link: https://www.microfocus.com/documentation/idol/IDOL_12_0/MediaServer/Guides/html/English/Content/Getting_Started/Configure/_TRN_Set_up_PostgreSQL.htm


https://gist.github.com/Kartones/dd3ff5ec5ea238d4c546


---Importing databasefile.sql to created database databasename

$psql -h localhost -U databaseuser -d databasename -f D:\Backup\databasefile.sql

reference:

https://sqlserverguides.com/postgresql-import-sql-file/

---Export database in windows

$pg_dump -U databaseuser databasename > testdbbackup.sql

reference:

https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/importing-and-exporting-data-in-postgresql


Comments

Popular posts from this blog

Create table in mysql database in phpmyadmin panel