Subject | RE: [Firebird-Architect] Denullify a database |
---|---|
Author | unordained |
Post date | 2004-09-21T08:57:19Z |
I'm not seeing this in the thread, perhaps it's only unclear to me, but doesn't not inserting a
value for a column (specifying the list of columns whose values are being sent) make the server use
the DEFAULT value for each missing value, and NULL if no DEFAULT exists? Is the problem he's
encountering that some libraries/tools assume they must send something for every single column, and
will therefore never let the DEFAULT be used, always preferring to send NULL instead? There was
some mention of getting from the server what the DEFAULT values would be for columns, in order to
set those values manually before an insert ... but just not sending anything for a few columns
seems both easier and safer. Is that simply not a possibility with the libraries/tools he's using?
-Philip
---------- Original Message -----------
From: "Claudio Valderrama C." <cvalde@...>
value for a column (specifying the list of columns whose values are being sent) make the server use
the DEFAULT value for each missing value, and NULL if no DEFAULT exists? Is the problem he's
encountering that some libraries/tools assume they must send something for every single column, and
will therefore never let the DEFAULT be used, always preferring to send NULL instead? There was
some mention of getting from the server what the DEFAULT values would be for columns, in order to
set those values manually before an insert ... but just not sending anything for a few columns
seems both easier and safer. Is that simply not a possibility with the libraries/tools he's using?
-Philip
---------- Original Message -----------
From: "Claudio Valderrama C." <cvalde@...>
> Milan Babuskov wrote:------- End of Original Message -------
> > Hm, still doesn't answer the question: What if I have a nullable
> > column with default, and want to insert NULL? Or is that not going to
> > be addressed by this at all?
>
> I'm not Geoff's lawyer <g>, but I think he only intended to touch the case
> when NOT NULL and DEFAULT go together. In a nullable column, you've the
> right the insert NULL despite any default may exist and therefore any change
> that may be agreed in the future won't affect that part.
>
> C.