filmov
tv
PostgreSQL default and Template databases

Показать описание
This video talks about default PostgreSQL database server. Below is the notes used in this recording:
***
Three default databases:
1) Postgres: User database
2) Template0: Template database. but, please don't drop this database
3) Template1: Is modifiable. You can drop this. And copy back from Template0.
a) Database location: $PGDATA/base/
b) Creation of a basic database
create database testdb1;
c) drop template1 database:
UPDATE pg_database SET datistemplate = 'f' WHERE datname = 'template1';
DROP DATABASE template1;
d) recreate template1 database:
CREATE DATABASE template1 TEMPLATE = template0 IS_TEMPLATE = 1;
e) psql -E : To display backend queries of backslash/metadata commands
f) pg_database: metadata table
g) Query to display database information:
ORDER BY 1;
***
***
Three default databases:
1) Postgres: User database
2) Template0: Template database. but, please don't drop this database
3) Template1: Is modifiable. You can drop this. And copy back from Template0.
a) Database location: $PGDATA/base/
b) Creation of a basic database
create database testdb1;
c) drop template1 database:
UPDATE pg_database SET datistemplate = 'f' WHERE datname = 'template1';
DROP DATABASE template1;
d) recreate template1 database:
CREATE DATABASE template1 TEMPLATE = template0 IS_TEMPLATE = 1;
e) psql -E : To display backend queries of backslash/metadata commands
f) pg_database: metadata table
g) Query to display database information:
ORDER BY 1;
***
PostgreSQL default and Template databases
How to Use a Custom Template Database in PostgreSQL
Postgres Job Scenario - Template databases Template0 Vs Template1 #postgres #postgresql #oracledba
Tutorial 16-Default databases PostgreSQL?
Postgres Architecture - Directories , Schemas, Database Cluster #postgres #postgresql #oracledba
How to List and Create Databases in PostgreSQL
Databases: Setting a default collation for a postgresql database
Databases: Postgresql: set default psql client encoding
PostgreSQL Node JS Express CRUD | REST API Tutorial
Databases: How to set default schema for PostgreSQL debugger? (2 Solutions!!)
Display data from a PostgreSQL database using Go templates
PostgreSQL : Postgres Default user
How to Import Database(.sql) in PostgreSql
Databases: Set a default value for a jsonb property in PostgreSQL
How To Create Database In PostgreSQL by Manish Sharma
Create Database PostgreSQL
How are 'DEFAULT PRIVILEGES' implemented in Postgresql?
What Is PostgreSQL?
Mastering Tablespaces in PostgreSQL: Boost Performance & Efficiency
Comparing SQL Server and PostgreSQL | PostgreSQL 101
Databases: Add column with default in postgresql without table level lock (2 Solutions!!)
PostgreSQL for Oracle DBAs
PostgreSQL Create Database
PostgreSQL Database Architecture
Комментарии