Skip site navigation (1) Skip section navigation (2)

Re: Copy/Paste table(s) functions - git context patch

From: Vladimir Kokovic <vladimir(dot)kokovic(at)gmail(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Copy/Paste table(s) functions - git context patch
Date: 2011-10-13 04:22:24
Message-ID: CAHsHPqeMTbO6doBnXd9eMsSaMD2xOkMdf5H0V7Ou95_rpy2h8A@mail.gmail.com (view raw or flat)
Thread:
Lists: 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: pastetables.png
Description: image/png (322 bytes) (inlined above)
Attachment: pgadmin3.patch
Description: application/octet-stream (106.6 KB)

In response to

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2011-10-14 18:07:18
Subject: Server maintenance
Previous:From: Simon RiggsDate: 2011-10-10 21:17:38
Subject: Re: One click installer a bit bare?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group