postgreSQL#
- PostgreSQL USE on Linux Terminal
- Connection
- postgres āĻ Login
- alter postgres user password
- āĻ¯āĻĻāĻŋ specific user as (postgres) āĻāĻŦāĻ specific DataBase as (db_demo) āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻāĻ°ā§ connect āĻāĻ°āĻ¤ā§ āĻāĻžāĻ āĻ¤āĻžāĻšāĻ˛ā§
- āĻ¯āĻĻāĻŋ āĻāĻŽāĻ¨ āĻā§āĻ¨ DataBase āĻ connect āĻāĻ°āĻ¤ā§ āĻšā§ āĻ¯āĻž āĻāĻ˛āĻžāĻĻāĻž port āĻĨā§āĻā§ Host āĻāĻ°āĻž ,āĻ¤āĻž āĻšāĻ˛ā§ -h āĻāĻžāĻ āĻāĻŋ add āĻāĻ°āĻ¤ā§ āĻšāĻŦā§
- āĻā§āĻ¨ āĻāĻžāĻ°āĻŖā§ āĻ¯āĻĻāĻŋ SSL key āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻāĻ°ā§ DataBase āĻ connect āĻāĻ°āĻ¤ā§ āĻšā§ ,āĻ¤āĻž āĻšāĻ˛ā§ âdbname āĻāĻŦāĻ sslmodeâ āĻāĻžāĻ āĻāĻŋ add āĻāĻ°āĻ¤ā§ āĻšāĻŦā§
- Create user
- Drop or Delete user
- Create DataBase
- Create Schema
- Create Table
- Describe a table
- To describe a table such as a column, type, modifiers of columns, etc., you use the following command
- now see all created table by
- List users and their roles (To list all users and their assign roles, you use \du command
- Command history (To display command history, you use the \s command.)
- Execute psql commands from a file (In case you want to execute psql commands from a file, you use \i command as follows:)
- Edit command in your own editor
- Quit psql
- Connection
- pgcron doc
- add to postgresql.conf
- required to load pg_cron background worker on start-up
- add to postgresql.conf
- optionally, specify the database in which the pg_cron background worker should run (defaults to postgres)
- hostname:port:database:username:password
- Schedule jobs via background workers instead of localhost connections
- Increase the number of available background workers from the default of 8