|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello good people!
Here I am with another (probably) silly situation: I know that when you create a column on a table without referencing an existing user created domain, one is automatically generated by the system (named like RDB$nnn) and used in that column - OK. I've created all domains i needed for my tables and went fine up to that point. The problem is here now: when I created a view, I noticed that the columns referencing directly a table column inherit its domain, but the ones going through functions (UDF, CASE or whatever) get a system generated domain, and I can't use a Cast .. as some_user_domain. I wanted to know if that behavior is by design or there is a way to make it inherit or accept a specific domain in this situation. Thanks in advance, even if only for your patience reading this ![]() |
|
#2
|
|||
|
|||
|
Hi,
I'd say that it doesn't really matter in a VIEW column inherits the DOMAIN datatype. Anyway, a column that goes through a function (albeit an UDF or CASE or whatever) isn't the same as the domain anymore (a CASE can change a NUMERIC datatype to a VARCHAR, for instance). So it makes sense. -- With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com
__________________
Martijn Tonies Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle Upscene Productions http://www.upscene.com |
|
#3
|
|||
|
|||
|
Thanks for your reply
My concern wasn't about changing the domain, but the creation of too many system domains (they weren't reused in any of my tests). I don't know if it is a problem or not but, in a database with, let's say, hundreds of views and stored procedures you will end up with a lot of system domains. Of course, this might be pretty usual in the Firebird world and my worries just nonsense of a begginer, wich i really am ![]() Best regards |
|
#4
|
|||
|
|||
|
>this might be pretty usual in the Firebird world
It is I really wouldn't worry about those... -- With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Views and domains |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|