pgAdmin III commit: Save new comments on already existing columns when

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin III commit: Save new comments on already existing columns when
Date: 2012-11-29 21:44:09
Message-ID: E1TeBtx-0001H7-1K@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Save new comments on already existing columns when editing a table

If I use the object browser context menu for an existing table and
choose "Properties...', I get a dialog that looks identical to dialog
for creating the table. It allows me to add a new column to the table
just like in the table creation case, and it asks for a comment on the
new column. But that comment gets thrown away. The SQL tab reflects
the ALTER TABLE statement to add the column, but not the additional
statement to record the comment on that new column.

This patch fixes this. Unfortunately, it has a side-effect. When someone
changes a column property (but not the comment), and the column already had a
comment, it adds a COMMENT query with the old comment. So it's one useless
query. Not a big deal, and fixing this would be a huge work.

Per a report from Jeff Janes.

Branch
------
REL-1_16_0_PATCHES

Details
-------
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=e55eecfa2344d790318e1af4eeee66d80a383682

Modified Files
--------------
CHANGELOG | 2 ++
pgadmin/dlg/dlgTable.cpp | 15 ++++++---------
2 files changed, 8 insertions(+), 9 deletions(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2012-11-30 06:59:56 Fixed Apply button crash
Previous Message Guillaume Lelarge 2012-11-29 19:04:51 Re: SQL Editor hangs on COPY TO STDOUT