Toad World® Forums

Redshift table structure not showing properly

I have a table with this format:
create table event(
eventid integer not null distkey,
venueid smallint not null,
catid smallint not null,
dateid smallint not null sortkey,
eventname varchar(200),
starttime timestamp);

The table gets created fine but the object explorer does not show the table with the columns in the same format. When I run 'select * from event' the data comes back in the proper format but the explorer is wrong. Very confusing.

Hi Mark, in Object Explorer are columns in alphabetical order.
br.
miro

to me that is very confusing. Generally you want to see the columns in the order they are in the table, not in alphabetical order. How do I know what the first column is in the table without running a query? Maybe it is a visual thing but all of the other tools we work with (Quest and non-quest) display the objects in the column order, not alpha. If I build a table with the primary key field in the first position, say person_id, I expect that to be the first field I see in the explorer. Displaying a field named budget_amt first makes me think that budget_amt is the key, not person_id.
That is my take on the layout.

Hi Mark, i agree that there is a missing option for that behavior, i will create an improvement ticket for that.
m.