Category: Postgresql
PostgreSQL – Revoke super user privileges
You can revoke the super user privileges previously granted to a database user by running the below sql command where username is
Continue readingPostgreSQL – Change Schema Owner
Run the below command to change the owner of a postgres schema where schemaname is the name of the schema
Continue readingPostgreSQL – Renaming a Schema
Below is the command to rename a schema in postgres database where ‘schemaname‘ is the current name of the schema
Continue readingPostgreSQL – How to generate and insert a random uuid
Postgres database provides a gen_random_uuid() function to generate a random uuid. This function can be used in a sql insert
Continue readingPostgreSQL – View Database Version
Run the below sql command to query the version of your postgres database. select version();
Continue readingPostgreSQL – List all tables of a schema
Run the below sql query to view all the tables of a schema in Postgresql database where schemaname is the
Continue readingPostgreSQL – Describe a Table
PostgreSQL does not provide a ‘DESCRIBE’ command like Oracle. You can however describe a table in Postgres either by querying
Continue reading