Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.
I created a DOMAIN as following:
CREATE DOMAIN country_id AS uuid;
I create such domains for readability. It is much easier to read function definitions which accept a country_id instead of a uuid.
As far as I was able to find out, it is currently not possible in PostgreSQL v9.5 (and above?) to obtain implicit casting with custom range types. To illustrate,
when I define the following demo setup:...
I have to create a custom domain that is an interval between two years, but i actually need both years.
Is there a way to pack both years inside a single domain, ...
The PostgreSQL CREATE DOMAIN command appears to create the domain at the schema level. Is there a best approach I should be aware of that would allow me to reuse domains across the multiple schemas ...
How can I define or change a domain based on another attribute value?
F.e. domain for salary is a numeric value > 500. But if a date the person was hired > January 1st, 2013, then the salary must be >...