Re: Basic DOMAIN Support
От | Rod Taylor |
---|---|
Тема | Re: Basic DOMAIN Support |
Дата | |
Msg-id | 092d01c1c651$72e3b1e0$b002000a@jester обсуждение исходный текст |
Ответ на | Re: Basic DOMAIN Support (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Basic DOMAIN Support
|
Список | pgsql-patches |
> "Rod Taylor" <rbt@zort.ca> writes: > >> copyfuncs.c:2232: warning: `_copyCreateDomainStmt' defined but not > > used > > > Commented out, but left in for potential use. > > Wrong answer --- what this is reminding you is that you forgot to call > it. Yeah, that was my thought too -- when I created it I was unable to find how to use it. Just that I noticed a TODO item stating that everything should have one. I guess I don't understand -- among other things -- why DomainStmt needs to be copied? Found the switch at the bottom of copyfuncs.c, and have added the element. > Also, I'm fairly confused by the code in MergeDomainAttributes and > DefineDomain. You seem to have modeled this on table creation, not > type creation, which makes little or no sense to me. Where in the > heck does a domain "inherit" from? MergeDomainAttributes pushes the domains configuration onto a table field during table creation where the field type is a domain. Overkill for defaults, but will be very useful once domains have various constraints. In this way the table is very much inheriting the attributes of the domain. This was created as per your suggestion that a table should take on domain attributes during creation rather than during execution. Define domain pulls in attributes of a type BUT has to process things such as Defaults, Not NULL constraints and eventually CHECK constraints, Foreign keys. Those items are very much like table fields, just stored elsewhere.
В списке pgsql-patches по дате отправления: