> After figuring out why, and modifying it to work as you suggest, it
> strikes me that actually it's not wrong imho. In all cases, the edit
> grid currently takes null-on-insert to mean 'don't insert this value'.
> This ensures that default values for the column will always be respected
> upon insert - for example, leave a text column empty, and it'll pick up
> it's default value. If we made empty/blank/undetermined consistently
> force the value to NULL, there would be no way to pickup the default
> value for a column. As it is now, the worst case is a 2nd edit is
> required to reset a column with a default value back to null.
> It is possible to change this of course by having a quad state checkbox
> for booleans, and allowing a keyword such as <DEFAULT> to be entered
> into other types. There are a couple of problems with that, not least of
> which is that we'd need to create a custom checkbox control because we
> only have tri state ones at present. We'd also need to figure out some
> way to actually enter <DEFAULT> into a text column in case that was a
> legitimate data value for some people, and to alllow those characters in
> a numeric column, but only in that order, and on their own.
> I'm not sure this is ever likely to get fixed to be honest.
So this could be fixed for boolean values but not so easily for others.
I propose a TODO list item:
- EditGrid: distinguish between entering NULL and nothing (= DEFAULT).
In response to
pgadmin-hackers by date
|Next:||From: Erwin Brandstetter||Date: 2007-06-05 17:56:31|
|Subject: Testing 1.7: Errors with function pldbg_get_target_info(..)|
|Previous:||From: Florian G. Pflug||Date: 2007-06-04 16:27:53|
|Subject: Re: recovery_target_xid & crashes on the master|