Skip to content

Instantly share code, notes, and snippets.

View petravic's full-sized avatar

Karlo petravic

  • Zagreb, Croatia
View GitHub Profile
@petravic
petravic / PostgreSQL_index_naming.rst
Created July 14, 2020 07:43 — 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;
@petravic
petravic / PostgreSQL-12-debian.md
Last active May 20, 2020 11:24
PostgreSQL 12 instalation/upgrade on Debian Linux

Custom PostgreSQL install repository setup

Install to be able to sign custom repository

apt install gnupg gnupg2

Add custom repository to apt list

nano /etc/apt/sources.list.d/pgdg.list
@petravic
petravic / php-oci8-debian.md
Last active May 19, 2020 06:08 — forked from milo/php-oci8-debian.md
Oracle OCI8 extension on Linux Debian

Oracle Instant Client libraries installation

Download Oracle Instant Client libraries (URL may change, already happened few times). Be sure you download correct (x64 or x32) architecture. And correct version. I'm using Instant Client 10.1.0.5.0 with Oracle 10g, 11g and 12c and PHP 5.6, 7.1, 7.2, 7.3 and 7.4. Never hit any problem with such setup but my queries are quite simple.

Last time I used Instant Client 19.6.0.0.0 and compiled with PHP 7.4 fine. I had to download two files:

instantclient-basic-linux.x64-19.6.0.0.0dbru.zip
instantclient-sdk-linux.x64-19.6.0.0.0dbru.zip

and extacted them into single directory. I'm using /usr/local/lib/oracle. File tree follows: