[GENERAL] Why is this functional index not used?

2017-03-21 Thread ibeq GmbH
Given a country table and an order table: CREATE TABLE g.country ( -- inherited from table g.standard: oid uuid NOT NULL, -- ... some more columns inherited... lisocode integer NOT NULL, -- Numeric ISO 3166 code szisoalpha2 character varying(2), -- The 2 letter country code szisoalpha3 char

[GENERAL] ON CONFLICT DO for UPDATE statements

2016-05-12 Thread Klaus P. Pieper - ibeq GmbH
We run two separate databases which are synchronized through our own replication system (two master databases, so we use our own trigger based methods). Let's call the two databases "main" and "remote". >From time to time we get constraint violations on sorting fields classified >UNIQUE when us