altering table properties - Mailing list pgadmin-hackers

From Miha Radej
Subject altering table properties
Date
Msg-id 4333F18E.3020904@siix.com
Whole thread Raw
In response to wrong order of drop ... create ... sentences  (Diego Gil <diego@adminsa.com>)
Responses Re: altering table properties
List pgadmin-hackers
hi!

thank you for fixing the sql query order in svn. i have, however,
noticed some other things which might be annoying:

when wanting to change a table name and a column name at the same time,
pgadmin produces this (this is all done via the properties option from
the context menu):

ALTER Table budgettype RENAME TO budget_type;
ALTER TABLE budgettype RENAME budgettype_name  TO budget_type_name;

which will fail because the table name ought to get changed with the
first query. pgadmin keeps working with the original table name instead
of using the new table name after issuing the rename table statement.
and, not wanting to nag, but to be consistent, the keyword "Table" ought
to be uppercase, like everything else ;)

also, i wanted to remove a constraint (primary key) and add a new one
and pgadmin produced thie following code:

  CONSTRAINT ALTER TABLE budget_type DROP CONSTRAINT pkey_budgettype;
ALTER TABLE budget_type ADDpkey_budget_type PRIMARY KEY (id);


there is an unneccesary " CONSTRAINT " in front of the first query and
in the second query there is no space between the ADD keyword and
constraint name.

i am using pgadmin3 compiled from svn (fresh checkout from an hour ago),
on suse linux 9.3.

cheers,
Miha

pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r4459 - in trunk/pgadmin3/src: dlg schema
Next
From: Miha Radej
Date:
Subject: Re: altering table properties