Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0t2G-0005AP-TS for pgsql-admin@arkaria.postgresql.org; Wed, 29 Jul 2020 20:50:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k0t2F-0006Pt-R2 for pgsql-admin@arkaria.postgresql.org; Wed, 29 Jul 2020 20:50:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0t2F-0006Pm-F2 for pgsql-admin@lists.postgresql.org; Wed, 29 Jul 2020 20:50:47 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0t2B-0007Am-Tw for pgsql-admin@lists.postgresql.org; Wed, 29 Jul 2020 20:50:45 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 4A9503805B4; Wed, 29 Jul 2020 22:50:41 +0200 (CEST) Received: from rs.plausibolo.de ([IPv6:::1]) by localhost (h2367442.stratoserver.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id WrYG_Oq3y4_l; Wed, 29 Jul 2020 22:50:41 +0200 (CEST) Received: from [10.154.93.168] (unknown [46.114.109.168]) by rs.plausibolo.de (Postfix) with ESMTPSA id DBB41380302; Wed, 29 Jul 2020 22:50:40 +0200 (CEST) Date: Wed, 29 Jul 2020 22:50:37 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----PMD6CG1W9WVON3EXT8UT4UYXWTIGMG" Content-Transfer-Encoding: 7bit Subject: Re: Re-order columns? To: pgsql-admin@lists.postgresql.org,"David G. Johnston" ,Wells Oliver CC: pgsql-admin From: Holger Jakobs Message-ID: <52AC5CB8-0EBF-4B28-9673-723AC252F619@jakobs.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------PMD6CG1W9WVON3EXT8UT4UYXWTIGMG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Actually, the order of columns is of _no_ importance, since columns are ide= ntified by name and not by column number=2E It's the same as the order of r= ows in a table - undefined (unless you use order by)=2E That columns appear to have some kind of order and show in tools with a st= able order has technical reasons and is not rooted in relational theory=2E Of you prefer a different order, use a view=2E Am 29=2E Juli 2020 22:45:06 MESZ schrieb "David G=2E Johnston" : >On Wednesday, July 29, 2020, Wells Oliver >wrote: > >> I know this kind of dumb, but is there a way to re-order columns? You >> know, you have your awesome table all defined, your favorite >modified_at >> column at the end where you like it, then some guy comes along and is >like >> "oh let's add X Y and Z" and your OCD really really really wants the >> modified_at col at the end, and blowing away/re-populating the table >takes >> way too long >> > >There is not=2E Every so often this gets looked at but has yet to result >in >a commit=2E > >David J=2E --=20 Holger Jakobs, Bergisch Gladbach +49 178 9759012 - sent from mobile, therefore short - ------PMD6CG1W9WVON3EXT8UT4UYXWTIGMG Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Actually, the order of columns is of _no_ importan= ce, since columns are identified by name and not by column number=2E It's t= he same as the order of rows in a table - undefined (unless you use order b= y)=2E

That columns appear to have some kind of order and show in too= ls with a stable order has technical reasons and is not rooted in relationa= l theory=2E

Of you prefer a different order, use a view=2E

Am 29=2E Juli 2020 22:45:06 MESZ schrieb "Davi= d G=2E Johnston" <david=2Eg=2Ejohnston@gmail=2Ecom>:
On Wednesday, July 29, 2020, Wells Oliver <wells=2Eoliver@gmail=2Ecom> wrote:
I know this kind of dumb, but is ther= e a way to re-order columns? You know, you have your awesome table all defi= ned, your favorite modified_at column at the end where you like it, then so= me guy comes along and is like "oh let's add X Y and Z" and your OCD really= really really wants the modified_at col at the end, and blowing away/re-po= pulating the table takes way too long

There is not=2E  Every so often this ge= ts looked at but has yet to result in a commit=2E

= David J=2E 


--
Holger Jakobs, Bergisch Gladbach
+49 178 = 9759012
- sent from mobile, therefore short -
------PMD6CG1W9WVON3EXT8UT4UYXWTIGMG--