Skip site navigation (1) Skip section navigation (2)

Re: Distinct types

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "PG Hackers" <pgsql-hackers(at)postgresql(dot)org>,"Peter Eisentraut" <Peter(dot)Eisentraut(at)Sun(dot)COM>
Subject: Re: Distinct types
Date: 2008-10-31 15:01:05
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
>>> Peter Eisentraut <Peter(dot)Eisentraut(at)Sun(dot)COM> wrote: 
> Here is an implementation of distinct types, known from SQL99 and 
> beyond.  They are like domains, except that they don't have defaults
> constraints and they do not allow implicit casting to their base
> The latter aspect is what makes them distinct types.  They are useful
> create more type-safe database schemas, to prevent using generic
> such as text or int for everything and then mixing them in
> ways.
I expect I'll be using this.  Thanks!
I notice there's no documentation yet.  Do you have a reference to a
good description of the feature, consistent with your implementation?
If not, a couple questions:
(1)  Can you compare a literal of the base type?
(2)  Can you explicitly cast to the base type?

In response to


pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-10-31 15:04:13
Subject: Enabling archive_mode without restart
Previous:From: Nikhil SontakkeDate: 2008-10-31 14:50:46
Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group