Thread: Editing data.

Editing data.

From
Kurt Roeckx
Date:
It seems that while you're editing data, it tries to do an update
for all the records matching the first field.  This is not what I
want at all.  The primary key exists of 3 fields, and mostly the
first field is the same.

Could it be made so that it uses the fields of the primary keys
instead of just the first field?  Or use the old data if no
primary key is available ...

Also, I'd like to be able to set a record to NULL in it.


Kurt


Re: Editing data.

From
"Dave Page"
Date:

> -----Original Message-----
> From: Kurt Roeckx [mailto:Q@ping.be]
> Sent: 03 February 2003 20:00
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] Editing data.
>
>
> It seems that while you're editing data, it tries to do an
> update for all the records matching the first field.  This is
> not what I want at all.  The primary key exists of 3 fields,
> and mostly the first field is the same.

Hi Kurt,

pgAdmin doesn't blindly use the first field, it looks for a primary key,
and if found, uses that, otherwise it builds a query based on the
original values of all usable columns. It doesn't currently handle
multipart primary keys, and in this case will try to use the first field
of the key (not the first field overall).

> Could it be made so that it uses the fields of the primary
> keys instead of just the first field?  Or use the old data if
> no primary key is available ...

The fix is on the todo list.

> Also, I'd like to be able to set a record to NULL in it.

This can't easily be done because we have no way to know that the user
wants null as opposed to an empty string. Of course, it cannot be done
for your primary key columns anyway.

Regards, Dave.

Re: Editing data.

From
Kurt Roeckx
Date:
On Mon, Feb 03, 2003 at 10:02:26PM -0000, Dave Page wrote:
>
> > Could it be made so that it uses the fields of the primary
> > keys instead of just the first field?  Or use the old data if
> > no primary key is available ...
>
> The fix is on the todo list.

Thanks.

> > Also, I'd like to be able to set a record to NULL in it.
>
> This can't easily be done because we have no way to know that the user
> wants null as opposed to an empty string. Of course, it cannot be done
> for your primary key columns anyway.

Just a button to set it to NULL would be nice, don't try to guess
what the user wants.


Kurt


Re: Editing data.

From
Rod Taylor
Date:
> This can't easily be done because we have no way to know that the user
> wants null as opposed to an empty string. Of course, it cannot be done
> for your primary key columns anyway.

How about adding a right mouse button menu for the field with an option
'SET NULL'.  Display it grey'd out or something...


--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachment

Re: Editing data.

From
"Dave Page"
Date:

> -----Original Message-----
> From: Rod Taylor [mailto:rbt@rbt.ca]
> Sent: 03 February 2003 22:43
> To: Dave Page
> Cc: Kurt Roeckx; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Editing data.
>
>
> > This can't easily be done because we have no way to know
> that the user
> > wants null as opposed to an empty string. Of course, it
> cannot be done
> > for your primary key columns anyway.
>
> How about adding a right mouse button menu for the field with
> an option 'SET NULL'.  Display it grey'd out or something...

I suppose maybe a checkbox at the end of the field. I'll bear it in mind
for pgAdmin III.

Regards, Dave.