Re: 1.15 DD - order of columns

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Colin Beckingham <colbec(at)start(dot)ca>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: 1.15 DD - order of columns
Date: 2012-04-21 15:26:34
Message-ID: 1335021994.19769.0.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Sat, 2012-04-21 at 07:32 -0400, Colin Beckingham wrote:
> Another issue with creating SQL from the DD is that unpredictably the
> order of columns will change. Say you have authid, authname in your
> original table, your copy might be defined as or authid, authname or
> authname, authid in the copy.
>
> Order of columns is important in Postgresql since it can't easily be
> changed after table is created without delete and add back in a specific
> order.
>
> It appears to be important with respect to import of data from CSV, for
> example, where even if the header defines columns in a specific order,
> the import does not pick that up.
>
> Workaround is of course to open up the csv in a SS, rearrange the cols
> to suit, and export back to CSV, or simply drop and recreate the table
> using the SQL from the original definition if you have that option.

As usual, I added your comments to
http://code.pgadmin.org/trac/wiki/database-designer so that I can keep
track of them when I'll find the time to work on it.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Matthieu Pepin 2012-04-22 23:19:42 pgAdmin pgScript and ampersand
Previous Message Colin Beckingham 2012-04-21 15:06:07 1.15 DD - serial copied as integer