Skip to content

AWS bytes

  • Cheat Sheets
  • Concepts
    • Show All
    • S3 Concepts
  • How-To Guides
    • Show all
    • EC2
    • EBS
    • S3
    • Redshift
    • IAM
    • SQS
    • CloudWatch
    • Billing
  • CLI Guides
  • Contact Us
  • Tutorials
  • Interview Questions
  • Postgresql

Category: Postgresql

Postgresql

PostgreSQL – Rename Sequence

You can use the below command to rename an existing sequence where seq_name is the current name of the sequence

Continue reading
Postgresql

PostgreSQL – Move Sequence to a different Schema

You can use the below sql statement to move sequence to a different schema. Here seq_name is the name of

Continue reading
Postgresql

PostgreSQL – Rename Tablespace

Below is the syntax to rename a tablespace in Postgresql database where tablespace_name is the current name of the tablespace

Continue reading
Postgresql

PostgreSQL – Change Owner of Tablespace

You can change the owner of a Tablespace as shown below in Postgres database where tablespace_name is the name of

Continue reading
Postgresql

PostgreSQL – Identify tables used by a View

You can query the system catalog view view_table_usage to identify all the tables used by a view in Postgres database.

Continue reading
Postgresql

PostgreSQL – List all Schemas

You can query the system catalog table pg_namespace to view all the schemas in Postgres database. SELECT nspname, oid from

Continue reading
Postgresql

PostgreSQL – View all columns of a table

You can query the system catalog table ‘columns’ to view all the columns of a table and their data types

Continue reading
Postgresql

PostgreSQL – List all views

You can query the system catalog table ‘views’ to list all the views of a postgres database as shown below:

Continue reading
Postgresql

PostgreSQL – Drop Table

Syntax to drop a table in Postgres: DROP TABLE tablename; Syntax to drop multiple tables in Postgres: DROP TABLE tablename1,

Continue reading
Postgresql

PostgreSQL – Get ddl of a view

You can query the system catalog table ‘views’ to get the definition of a view in postgres database. SELECT view_definition

Continue reading

Posts pagination

«Previous Posts 1 … 5 6 7 8 9 10 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.