Re: Copy/Paste table(s) functions - git context patch - Mailing list pgadmin-hackers

From Vladimir Kokovic
Subject Re: Copy/Paste table(s) functions - git context patch
Date
Msg-id CAHsHPqeMTbO6doBnXd9eMsSaMD2xOkMdf5H0V7Ou95_rpy2h8A@mail.gmail.com
Whole thread Raw
In response to Re: Copy/Paste table(s) functions - git context patch  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Copy/Paste table(s) functions - git context patch
List pgadmin-hackers
Hi,

I finally found the time to make a new version !

> * When I copy a table, and then paste it, I can not paste it once more.
> Why is that?
Fixed

> * If I paste a table and there is an error (for example, the table
> Already exists), I can not paste it once more.
Fixed

> * If I paste a table, and click on the dialog asking me if I'm sure I
> Want to copy the table here, I can not paste it once more.
Fixed

> * If I paste a table to the same schema I copied it from, and if I click
> Cancel on the dialog asking me for a suffix, it keeps asking me for a
> Suffix (wether I click OK or cancel, the behavior)
Fixed

> * If I paste a table to another schema and the copied it from, and that
> The same table name exists in that schema, it asks me for a suffix. If
> I click cancel, it still tries to paste the table (it should not, I
> Clicked cancel).
Fixed

> * If I paste a table to another schema and the copied it from, and that
> The same table name exists in that schema, it asks me for a suffix. If
> I delete the suffix by default and click OK, it still tries to paste
> The table (it should, it's obvious it would fail).
> * If I paste a table and the table already exists, it asks me for a
> Suffix. If I put ". Whatever", it fails because the table name is not
> Quoted (I have a foo.bar.whatever CREATE TABLE, CREATE instead of
> TABLE foo. "Bar.whatever")
Fixed

> * By the way, when it fails to create the table, it should not try to
> Insert into it right after.
Yes

> * With drag and drop, the cursor changes too late ... and you should
> Change the cursor, it looks non-standard).
I do not know how to change the treectrl DND UI !

> * I do not like at all the "Copy tables from the list ..." dialog. It
> Should not display tables from every servers.
This was the main reason why I started CopyPasteTables !
I am DBA for multiple servers in different locations of a company.

> There are unexplained colors (green, blue, and red).
> Checkboxes are not usable on servers and databases.
> Unless you explain why, I think you should get rid of it, not fix it.
Now, only schema and tables are colored.

> On the code itself:
> * CtlCheckTreeView.cpp is a widget, that should not have any behavior
> Specific to one window. At least, not in the way this is done now.
I think the changes that were made do not affect the initial design
and functionality.

> * To check if a table exists, you look into pg_tables. You should better
> Browse the treeview.
> * BTW, you already have the function to do it (findTable)
Yes, but I need the function for a server which is not connected
(without using a browser refresh).

> * Messages should be in uppercase (Copied FROM ...).
Fixed

> I also do not understand this code in pgColumn.cpp:
> @ @ @ @ -327.7 +328.8 PgColumn wxString:: GetDefinition ()

> If ((sql == wxT ("integer") | | sql == wxT ("BIGINT") | |
> Sql == wxT ("pg_catalog.integer") | | sql ==
> WxT ("pg_catalog.bigint"))
> - & & (GetDefault () == seqDefault1 | | GetDefault () ==
> SeqDefault2))
> + & & ((& & Sequence9! GetSerialSequence (). IsEmpty ()) | |
> + (! Sequence9 & & (GetDefault () == seqDefault1 | | GetDefault () ==
> SeqDefault2))))
> {
> If (sql.Right (6) == wxT ("BIGINT"))
> Sql = wxT ("bigserial");
Without this, serial fields are not displayed as serial type for versions 9.x

> Another issue: I launch a copy and disconnect during copy. After I
> Reconnect, it crashes. But the table is there with its 6 million rows.
> And sometimes I do not need to reconnect: it crashes during the copy.
Fixed


Best regards,
Vladimir Kokovic, DP senior, Belgrade, Serbia

Attachment

pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Thread manager
Next
From: Dave Page
Date:
Subject: Server maintenance