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 – Export output to a csv file

Below is the command to export the result set of a select statement to a csv file with pipe delimiter

Continue reading
Postgresql

PostgreSQL – Create a Read Only User

You can create a read-only user in Postgres database by following the below sequence of commands: Create user: CREATE ROLE

Continue reading
Postgresql

PostgreSQL – Update one table from another

Below is the syntax to update columns of one table from columns of another table in Postgres database. UPDATE table1

Continue reading
Postgresql

PostgreSQL – ERROR: permission denied for relation

You might encounter the below error while accessing a database object in Postgres database. Error : permission denied for relation

Continue reading
Postgresql

PostgreSQL – List installed extensions

Run the below sql to list all the extensions that are currently installed in your postgres database. SELECT * FROM

Continue reading
Postgresql

PostgreSQL – Create User

A database user is required to establish a connection to the database. At a minimum, you need to specify the

Continue reading
Postgresql

PostgreSQL – OFFSET Clause

In Postgres, an OFFSET clause is used to skip the first ‘n’ number of rows specified by offset clause before

Continue reading
Postgresql

PostgreSQL – Grant super user privileges

To grant super user privileges to an existing database user, login as a super user and run the below sql

Continue reading
Postgresql

PostgreSQL – Create Function example

Example 1: Function to return the row count of a table: CREATE FUNCTION get_row_count(v_table) RETURNS int AS $$ DECLARE v_count

Continue reading
Postgresql

PostgreSQL – Modify current_schema and search_path

Run the below select statement to view the ‘current schema’. ‘Current schema’ is the default schema for database object creation

Continue reading

Posts pagination

«Previous Posts 1 2 3 4 5 … 10 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.