Re: Testing 1.7: issues in edit grid & query window

Поиск
Список
Период
Сортировка
От Erwin Brandstetter
Тема Re: Testing 1.7: issues in edit grid & query window
Дата
Msg-id 46644D9D.5090903@falter.at
обсуждение исходный текст
Ответ на Re: Testing 1.7: issues in edit grid & query window  (Dave Page <dpage@postgresql.org>)
Список pgadmin-hackers
Hi Dave!

dpage@postgresql.org wrote:
(...)
> 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).


Regards
Erwin


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: recovery_target_xid & crashes on the master
Следующее
От: Erwin Brandstetter
Дата:
Сообщение: Testing 1.7: Errors with function pldbg_get_target_info(..)