Re: Fixing contrib/isn for float8-pass-by-value

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Fixing contrib/isn for float8-pass-by-value
Дата
Msg-id 200811290022.29581.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: Fixing contrib/isn for float8-pass-by-value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: HEAD build failure on win32 mingw
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Distinct types