Re: Domains and function arguments
От | Peter Eisentraut |
---|---|
Тема | Re: Domains and function arguments |
Дата | |
Msg-id | Pine.LNX.4.44.0306171513380.2043-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: Domains and function arguments (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Domains and function arguments
|
Список | pgsql-hackers |
Tom Lane writes: > Admittedly, we have trouble resolving the type to use when a function is > overloaded with both a domain and a base type, but that's hardly > surprising. Even if you try to work it out, it's going to be a mess. During resolution, you would have to look inside the data to figure out which domain, if any, it might fit into. That means that the resolution of an expression depends on the actual data, not just the structure of the data (i.e., the data type). Of course, an expression typically needs to be resolved before the data is plugged in, so this approach cannot work. If you insist on allowing domains in argument lists, then I think the best approach is this: For purpose of function resolution, types and all domains defined over them are equivalent. That would mean, for example, that if you define positive_int as domain over int, then you cannot define foofunc(int) and foofunc(positive_int) as the same time. -- Peter Eisentraut peter_e@gmx.net
В списке pgsql-hackers по дате отправления: