Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/manuel7806/postgresql-snippets

PostgreSQL snippets extension for vscode
https://github.com/manuel7806/postgresql-snippets

Last synced: 3 days ago
JSON representation

PostgreSQL snippets extension for vscode

Awesome Lists containing this project

README

        

# PostgreSQL Snippets

Snippets for PostgreSQL.

## Table of Contents

- [DDL](#ddl)
- [DML](#dml)
- [Data Types](#data-types)
- [Constraints](#constraints)
- [Modify Tables](#modify-tables)
- [Alter Statements](#alter-statements)
- [Database Management](#database-management)

## DDL

- create/drop database
- create/drop schema
- create/drop table
- create/drop view
- create/drop index
- create/drop trigger
- create/drop enum

## DML

- select
- select where
- select order by
- select where order by
- select group by
- select where group by
- select where group by having
- select limit
- insert
- update
- delete

## Data Types

- smallint
- integer
- bigint
- decimal
- real
- double precision
- float
- smallserial
- serial
- bigserial
- varchar
- char
- timestamp
- timestamp with time zone
- date
- time
- time with time zone
- boolean

## Constraints

- not null
- primary key
- primary key increment
- composite key
- foreign key
- check
- named check
- unique
- named unique

## Modify Tables

- add/drop column
- add/drop constraint
- change/drop default
- change data type
- rename column

## Alter Statements

- rename database
- change database owner
- rename schema
- change schema owner
- rename table
- change table owner

## Database Management

- create role
- alter role
- rename role
- drop role
- grant privileges
- revoke privileges