Skip to content

Instantly share code, notes, and snippets.

@nrmncr
nrmncr / PostgreSQL_index_naming.rst
Created October 4, 2024 20:40 — forked from popravich/PostgreSQL_index_naming.rst
PostgreSQL index naming convention to remember

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;
@nrmncr
nrmncr / docker-clear.bat
Last active July 31, 2019 20:39 — forked from daredude/docker-clear.bat
delete all docker container and images on windows
@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i
rem only dangling
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}" -f "dangling=true" -q') DO docker rmi %%i