Re: [HACKERS] Domains and function arguments

2003-06-17 Thread Josh Berkus
Tom, "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

Re: [HACKERS] Domains and function arguments

2003-06-17 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > 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 > resolu

Re: [HACKERS] Domains and function arguments

2003-06-16 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > The SQL standard does not allow functions to have domains as arguments. > Semantically, they have a point. I don't think they do. Declaring a domain as the input type seems a very natural way of asserting that the function only works over a subset of