Re: Range Types, constructors, and the type system
От | Florian Pflug |
---|---|
Тема | Re: Range Types, constructors, and the type system |
Дата | |
Msg-id | 150CAF5F-E764-4539-94CF-7C6B643836F5@phlo.org обсуждение исходный текст |
Ответ на | Range Types, constructors, and the type system (Jeff Davis <pgsql@j-davis.com>) |
Ответы |
Re: Range Types, constructors, and the type system
|
Список | pgsql-hackers |
On Jun26, 2011, at 00:29 , Jeff Davis wrote: > declare the return type of a function, and then use the declared type to > infer the argument types. That would be nice because you would just have > to do: > range(1,10)::int8range > However, that's kind of backwards from how our type inference system > works now, and sounds like a big change. Well, there actually *is* some precedence for that kind of top-down (form a syntactic perspective) type inference. We *enforce* the cast in array[]::<arraytype> and actually for a very similar reason - without the case, there's no way of knowing which type of empty array was meant. I think we also special-case 'literal'::<type> to use the input function of type directly, instead of first creating a text value and later casting it to <type>. best regards, Florian Pflug
В списке pgsql-hackers по дате отправления: