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 1lXbiD-00055g-Qi for pgsql-admin@arkaria.postgresql.org; Sat, 17 Apr 2021 03:33:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXbiB-0007Jl-Rs for pgsql-admin@arkaria.postgresql.org; Sat, 17 Apr 2021 03:33:35 +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 1lXbiA-0007Je-Ud for pgsql-admin@lists.postgresql.org; Sat, 17 Apr 2021 03:33:35 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lXbi5-0002Ta-Ep for pgsql-admin@lists.postgresql.org; Sat, 17 Apr 2021 03:33:33 +0000 Received: by mail-ot1-x332.google.com with SMTP id f75-20020a9d03d10000b0290280def9ab76so22436443otf.12 for ; Fri, 16 Apr 2021 20:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=9amzo0h9bzF3EdTWDdPXq6nVx7cP66uhJqjKVGExwSc=; b=YwzDk5BONHMhreKv8sCel1yw+2/ntNsVmBNvfTxEGH/iaV+sBva57fokPo13+YjodR UkALoEshN5AjXIJtdzbFJYeoUKhXwt1u5jXf62sMf5fS4K9aHU0OB6xqfVJkJCM/3wTu mpt6L+kfUVGukSKlU+dhx6XvpDNX43hsD4Z01IpromQ5AZwOWX3sFKp08vaG6+C1dBBG WDcCDsFnmg+H9GISOzQS+pXwclCuLAhTcE3lkixS22LVrAlRD5x0a+GoE5pG4C0hLLGD Exf7rwnOp3wKgvv5/nmPp+Wc22ZboAtLEjHGWPS+ZhCr6UuPNvNIpju8bNwNxkgT/1Dw mZCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9amzo0h9bzF3EdTWDdPXq6nVx7cP66uhJqjKVGExwSc=; b=tU+vZK5LldwM2lQQOWuwLuzWA6tRjByNcpUow20BfpYPdbkQRrgi1ywvh/u3k+QZ8C f6aFVG74Se8sI02LVwAnTBvzBbnYSHFPMOh763SN5wV2o7H1MRXhphCBig01G858+ruy hY/T9VITexYiAGwndj7+RgmVir46JDSJLFhiLkDv+xLoIH05PQ18VjJuA03dhkFFvsrV jp0Cl1sizP3bmleJarFmOIAgLgnlaeQrZwP5YhV4KqA7DaAHd34DnKerntrPZipnCGKS WgmdVCn0bOI6snt304TfLRy1RWN0ISzOwjbBUQFAaanilp/vBglT+1rLpxLCK42SGa5O vb7g== X-Gm-Message-State: AOAM531gLoIZ0BvY3I2Jwbt0btudvvfTINN8iHZECK6PT20fSSEL3cPM NziIh8mto0hA/9Imfc9hLwcVaoCb5fU= X-Google-Smtp-Source: ABdhPJx1Djqa9DgJPnbSBCMrnx6t3O9ITG+dJa1EqIlZYLuGG2TMJpIpAtSP68QvdxuKwTFtl0V6CQ== X-Received: by 2002:a05:6830:2117:: with SMTP id i23mr5976210otc.331.1618630407863; Fri, 16 Apr 2021 20:33:27 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id p3sm1348398oic.28.2021.04.16.20.33.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Apr 2021 20:33:27 -0700 (PDT) Subject: Re: Reordering the fields in a table To: pgsql-admin@lists.postgresql.org References: From: Ron Message-ID: Date: Fri, 16 Apr 2021 22:33:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/16/21 2:54 PM, Laurenz Albe wrote: > On Fri, 2021-04-16 at 16:15 +0000, Campbell, Lance wrote: >> I would love to see an enhancement to PostgreSQL where administrators had some way to reorder the fields in their tables. >> >> Why is this a big deal? >> The one issue that causes me the most grief is the readability of tables. When you manage 17 services >> where you are continually tweaking the system you find the tables are very unreadable. >> New fields are continually added to the bottom of tables. They are just not readable. > There is a misconception here. > Database tables are not designed for human consumption. Rubbish.  Database tables are designed by humans to store data that humans care about. > If you want to present your table data in a readable format, you need a front end application. > Arranging table columns is the job of such a tool. Adding "ALTER TABLE MOVE COLUMN ... BEFORE/AFTER COLUMN ..." is pretty trivial, requiring "just another table", which stores the physical order of the columns, and also the order in which they are presented to the "user layer".  I know this because such a feature was implemented 15+ years ago in Rdb/VMS. -- Angular momentum makes the world go 'round.