Re: named generic constraints [feature request]
От | Peter Eisentraut |
---|---|
Тема | Re: named generic constraints [feature request] |
Дата | |
Msg-id | 1259011825.2321.10.camel@vanquo.pezone.net обсуждение исходный текст |
Ответ на | Re: named generic constraints [feature request] (Caleb Cushing <xenoterracide@gmail.com>) |
Список | pgsql-hackers |
On mån, 2009-11-23 at 12:50 -0500, Caleb Cushing wrote: > and domains > only seem right if it's something, like a zip code, that has a very > specific set of rules, that is in reality it's own type. A domain is not really its own type, it's a domain over its base type. Hence the name. > where > specifying something like 'empty' feels as generic (and arbitrary?) as > null. The problem with your empty constraint is that it's data type specific, and therefore the operator is also different depending on context. So either you create a "named generic constraint" for every data type you are interested in (in that case, see domains), or the thing could at best work as a text substitution mechanism, which is something that SQL typically doesn't do. > empty is not the only example (I'm sure), just the best I can > think of. I doubt that there are any really good examples that cannot be solved with the current facilities.
В списке pgsql-hackers по дате отправления: