Re: Domains and type coercion

From: "Rod Taylor" <rbt(at)zort(dot)ca>
To: "Thomas Lockhart" <thomas(at)fourpalms(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Domains and type coercion
Date: 2002-03-21 19:01:33
Message-ID: 064801c1d10a$d3492970$5302000a@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> If we take the hard SQL99 line that domains *are* the base type plus
> constraints, then we could reduce domains to base types before we
start
> the entire matching process, and this issue would go away. This
would
> prevent declaring any specialized operators or functions for a
domain.
> (In fact, I'd be inclined to set things up so that it's impossible
to
> store domain type OIDs in pg_proc or pg_operator, thus saving the
time
> of doing getBaseType on one side of the match.) Thoughts?

It would be fairly straight forward to simply copy the domain base
type into the atttypid, then create an atttypdomain (normally 0,
except in the case of a domain). Everything would use the attypid,
except for \d and pg_dump which could use the domain if it exists.

Is this something I should do?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Tkach 2002-03-21 21:33:31 A bug in gistPageAddItem()/gist_tuple_replacekey() ???
Previous Message Fernando Nasser 2002-03-21 18:47:03 Re: Domains and type coercion