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

From: Erwin Brandstetter <brandstetter(at)falter(dot)at>
To: pgadmin-hackers(at)postgresql(dot)org
Cc: dpage(at)postgresql(dot)org
Subject: Re: Testing 1.7: issues in edit grid & query window
Date: 2007-06-04 17:36:29
Message-ID: 46644D9D.5090903@falter.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave!

dpage(at)postgresql(dot)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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Erwin Brandstetter 2007-06-05 17:56:31 Testing 1.7: Errors with function pldbg_get_target_info(..)
Previous Message Florian G. Pflug 2007-06-04 16:27:53 Re: recovery_target_xid & crashes on the master