Subject RE: [firebird-support] Changing numeric domain precision and scale
Author Peter Turner
Here's my 2-cent's worth.....my guess is that since it's a NUMERIC going
to a NUMERIC and only changing the "precision", it was OK. I can see
the VARCHAR (40) to VARCHAR (20) failing, as that's a size difference in
the field.



Pete Turner

Sun Nuclear Corporation



-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Martijn Tonies
Sent: Thursday, March 08, 2007 10:15 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Changing numeric domain precision and
scale





> >>>> I want to change a domain NUMERIC(18,4) to NUMERIC(15,2). Is
there
any
> >>>
> >>> You cannot. Firebird will not allow you to alter to a datatype
> >>> that holds less values.
> >> It allowed the change without any complains.
> >> Maybe because I don't have values larger than 15,2?
> >
> > Erick, I just tried it, and it does allow it. I'm puzzled :-)
> >
> > This fails, for example:
> >
> > CREATE DOMAIN D_TEST2 AS VARCHAR(40);
> > ALTER DOMAIN D_TEST2 TYPE VARCHAR(20);
> >
> > with message:
> >
> > unsuccessful metadata update
> > New size specified for column D_TEST2 must be at least 40
characters.
> >
> > I thought it always did that...
>
> Perhaps Erick is using a tool which manipulates system tables
directly?
;-)

Well, doing the ALTER for the numeric domain is being
executed without any error messages, so, there is - apparently -
a difference between modifying numerics and others.

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com <http://www.upscene.com>
My thoughts:
http://blog.upscene.com/martijn/ <http://blog.upscene.com/martijn/>
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
<http://www.databasedevelopmentforum.com>





[Non-text portions of this message have been removed]