Skip to content

Instantly share code, notes, and snippets.

@bookvik
bookvik / PostgreSQL_index_naming.rst
Created November 17, 2023 14:00 — 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;
type MyString = string
@bookvik
bookvik / PHP
Created September 18, 2012 08:42
Diff PHP and Python proto generated code
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin @package_version@
// Source: protos.proto
// Date: 2012-09-18 08:38:34
namespace {
class B extends \DrSlump\Protobuf\Message {