From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Fixing contrib/isn for float8-pass-by-value |
Date: | 2008-11-28 22:22:29 |
Message-ID: | 200811290022.29581.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Friday 28 November 2008 22:02:52 Tom Lane wrote:
> I had a better but more invasive idea: invent a new attribute for
> CREATE TYPE
>
> LIKE = typename
>
> which means "copy any unspecified representational details from the
> given pre-existing type". This would allow the .sql file to know
> less instead of more about what's happening, so it seems more
> future-proof. It's a bit more work than the makefile hack I was
> thinking about, but seems like a good investment. (I wouldn't
> propose this if I thought contrib/isn was the only user --- I expect
> there are other third-party modules with similar needs.)
Well, this is basically what I had planned with distinct types, at least in a
future phase. You will notice that the existing distinct type patch already
pretty much has the effect of copying another types represenation. From
there the difference is essentially only the casting behavior: distinct types
per SQL have fewer casts, domains have more casts. I was also planning to
devise some in-between cases for various use cases, such as creating
compatibility types.
I'm going to try to write up a wiki page collecting various use cases and
requirements so the bigger picture becomes clearer.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2008-11-28 22:26:13 | Re: Distinct types |
Previous Message | Peter Eisentraut | 2008-11-28 22:13:14 | Re: HEAD build failure on win32 mingw |