pgadmin-org / pgadmin4

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
https://www.pgadmin.org
Other
2.53k stars 656 forks source link

Cannot sort columns when importing data (RM #3029) #1606

Closed dpage closed 2 years ago

dpage commented 6 years ago

Issue migrated from Redmine: https://redmine.postgresql.org/issues/3029 Originally created by Big Banana at 2018-01-19 11:11:24 UTC.

As of pgAdmin 4.2.1 I cannot sort the columns when importing data from a file (eg tsv file). No matter how I delete them and added them back, the order is always the one in the database table, although I could have been provided with a file containing differently sorted values. Thanks

dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-1 Originally created by Murtuza Zabuawala at 2018-02-02 11:08:11 UTC.

Hi,

Could you please provide detailed steps with sample tsv file to re-produce the issue?

dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-2 Originally created by Big Banana at 2018-02-20 16:58:57 UTC.

Murtuza Zabuawala wrote:

Hi,

Could you please provide detailed steps with sample tsv file to re-produce the issue?

Hi,

Take a simple table (doesn't have to make logical sense):

CREATE TABLE test
(
    field_type integer,
    description text
)

And a tsv file which, for some reason, was created swapping the columns:

foo 1
bar 5
baz 8

If I were to populate this table with the import/export tool, I would proceed like this:

Right click on the table in the tables list -> "Import/Export..."

Go to the "Columns" tab

I would then delete "field_type" from the "Columns to export" field, to then type it again, hoping to insert it after "description" and thus having the same order of the values in the tsv file.

Unfortunately there seem not to be any way to change the order of the columns, as right after typing a new one it automatically "moves" to its original position (preserving the order of columns in the table. Maybe this was meant to work this way, I am not sure!

dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-3 Originally created by Akshay Joshi at 2018-05-18 10:54:11 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed Ready
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-4 Originally created by Khushboo Vashi at 2018-10-10 09:36:26 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed Ready EDB Sprint 25
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-5 Originally created by Akshay Joshi at 2018-10-23 06:07:37 UTC.

Redmine ticket header update:

Name Old Value New Value
Status changed New In Progress
Assigned To changed Akshay Joshi
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-6 Originally created by Akshay Joshi at 2018-10-24 09:35:35 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed EDB Sprint 25 EDB Sprint 26
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-7 Originally created by Akshay Joshi at 2018-10-25 10:59:36 UTC.

Patch Sent: https://www.postgresql.org/message-id/CANxoLDcZ5dZW2HtsbWh8=bcCzsBz6wBEARPbp2uf9Lf4vzMDuQ@mail.gmail.com

dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-8 Originally created by Dave Page at 2018-10-31 09:57:06 UTC.

Redmine ticket header update:

Name Old Value New Value
Fixed Version changed 3.6
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-9 Originally created by Akshay Joshi at 2018-10-31 10:09:46 UTC.

Applied in changeset commit:3359a0de7abc65ce7b30d2fce465e48caa35ac5d.

Redmine ticket header update:

Name Old Value New Value
Status changed In Progress In Testing
Done Ratio changed 0 90
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/3029#note-10 Originally created by Fahar Abbas at 2018-11-27 12:29:58 UTC.

This is resolved in pgAdmin4 3.6 Build and tested on Windows 64

Redmine ticket header update:

Name Old Value New Value
Status changed In Testing Resolved
Done Ratio changed 90 100
dpage commented 2 years ago

Issue closed on Redmine.