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 1lXUY0-0007vm-GY for pgsql-admin@arkaria.postgresql.org; Fri, 16 Apr 2021 19:54:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXUXz-0001Tc-DF for pgsql-admin@arkaria.postgresql.org; Fri, 16 Apr 2021 19:54:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXUXz-0001TV-0Z for pgsql-admin@lists.postgresql.org; Fri, 16 Apr 2021 19:54:35 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lXUXr-0003EG-Ie for pgsql-admin@lists.postgresql.org; Fri, 16 Apr 2021 19:54:33 +0000 Received: by mail-ed1-x534.google.com with SMTP id h10so33618487edt.13 for ; Fri, 16 Apr 2021 12:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=lbbgmJj0K21eshAjHR65+RAATmfCG484ARXdX5+hytI=; b=Mx5nez5JA5L9U6Vetqsuiz2Qb10cryqexs5omKph91mvJvZnVNPSyB6be18hXtaJ56 EppjVtLWNF5ysFeIWgDU+sF3xBddXOZq6rYtUKDJ8s1Oh0s/e7KZUrOWWhvsr4dOr/iz aaXJfWp1C4Y0FB4ts4spyfBXzI6eHELwYqsuv5giFppSl7OmzAeiqofgYe1HvQZ91T2D Iap5JsndZc9IVGi6DXb6Z1H5RxIPy6k+qUS/5DLRKg6o/jH2MKlQhkvpYvoPVmjyGxhQ bzftceZcgUND4+Edy2CC8z04R0yXGXd9Hne0ArugmRNwzwDsizDhhAyvbfwaINPg60LG ZuDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=lbbgmJj0K21eshAjHR65+RAATmfCG484ARXdX5+hytI=; b=UHlrDTnQMcehwZ2Lkga4lChGbW7Fsyn9Ww01he+IGFq26s5hwHR1H/FQ0p5pb2Bpz3 pPPF9tQHV0rfDbbVwey8IDK4X28/8ajRlcX9SJV2PFU9Zb5it5TYlOc/OY+4TIgrPYCg hEYfyaV3mS6Jk8G2r8xvM492X4KzMJPd3dFFfgcbItry071hpzasQC/91WWfaUU0bBhU SEzCon3UFZ51kFWaSR50FOAsGDy+GGldjVnqw6RPtWOk8KIOBHO52JLU4FuoCtkXrLFr LZZgA1sp4zbZDe/WyQ/fdNOd8yrfbmEsobWdSEnDDkcZQSGeIbM7HQ+tiG+jIZJUR0GD HbrQ== X-Gm-Message-State: AOAM530EgLG8esK7ZZL2Y/5DlkL01J7ePbgwPp90l5eW2++QKYvA3vp2 7MvMErwD4Dcv90LLs5K2agDYHw== X-Google-Smtp-Source: ABdhPJxE/zOb78ZAnJrGh6clqIKzhthuDR2fnuzY4JQDeqpX2w88oRpTI1AIOSz8ORt8hP72JEfOjA== X-Received: by 2002:aa7:c4d3:: with SMTP id p19mr12043883edr.289.1618602865323; Fri, 16 Apr 2021 12:54:25 -0700 (PDT) Received: from localhost.localdomain (178-190-173-84.adsl.highway.telekom.at. [178.190.173.84]) by smtp.gmail.com with ESMTPSA id d22sm4891031ejz.79.2021.04.16.12.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 12:54:25 -0700 (PDT) Message-ID: Subject: Re: Reordering the fields in a table From: Laurenz Albe To: "Campbell, Lance" , "pgsql-admin@lists.postgresql.org" Date: Fri, 16 Apr 2021 21:54:24 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. 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. If you want to do it in the database, use a view. Simple views that just reorder the columns are updatable, so you could just use those instead of the underlying tables in your statements. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com