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
How-To Guides / Redshift

How to identify columns that have default values in Redshift

Below is the query to identify all columns (and their default values) that have a default value defined in Redshift

Continue reading
How-To Guides / Redshift

How to list all the tables of a schema in Redshift

Run the below select statement to list all the tables of a schema where schemaname is the name of the

Continue reading
How-To Guides / Redshift

How to get the current user from Redshift database

Run the below select statement to obtain the username of the current session in Redshift. select current_user;

Continue reading
How-To Guides / Redshift

How to get day of week in Redshift database

Below is the query to return day of week from Redshift database. It returns a numeric output . 1 for

Continue reading
How-To Guides / Redshift

How to get current timestamp in Redshift database

getdate function can be used to return the current timestamp. select getdate();

Continue reading
How-To Guides / Redshift

How to identify users with superuser access in Redshift database

Use the below sql query to get a list of all superusers in Redshift database. select usename from pg_user_info where

Continue reading
How-To Guides / Redshift

How to list all database users in Redshift

You can query pg_user system catalog table for a list of all the database users in Redshit database. select usename

Continue reading
How-To Guides / Redshift

How to drop a database from redshift cluster

You can drop a database from Redshift cluster using below command where databasename is the name of the database that

Continue reading
How-To Guides / Redshift

How to drop a table in Redshift database

Below is the syntax to drop a table in Redshift database where tablename is the name of the table that

Continue reading
How-To Guides / Redshift

How to list all the users of a group in Redshift database

Use the below sql query to list all the users of a group where groupname is the name of the

Continue reading

Posts pagination

«Previous Posts 1 … 14 15 16 17 18 … 33 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.