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 1nJ3Qy-0000sf-DZ for pgsql-general@arkaria.postgresql.org; Sun, 13 Feb 2022 01:12:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJ3Qw-00018g-Gr for pgsql-general@arkaria.postgresql.org; Sun, 13 Feb 2022 01:12:10 +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 1nJ3Qw-00018W-3f for pgsql-general@lists.postgresql.org; Sun, 13 Feb 2022 01:12:10 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nJ3Qt-0001AO-9F for pgsql-general@lists.postgresql.org; Sun, 13 Feb 2022 01:12:09 +0000 Received: by mail-qt1-x833.google.com with SMTP id y8so12430677qtn.8 for ; Sat, 12 Feb 2022 17:12:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=sgN+H6iALj1ALXHK5SMsyeddyRr2Rp4bdRjabO5pzQQ=; b=iV3WBz9R7Y2wJpKSmS7iUGcNRTd9QjBWMKveWhNAw7uYqy6bbp2ZQ/a0NaXA5DN0Mx bkvzn3WVErHMi4SQCLpUtlTLSMuAq4mhw4duyADoNRCeC9FvwM/bBGSYfne5KCWmV8lt dILb17ctvCBpMjSCa3K/MVkhXI3DcxjcSEkCMCUmmlke2u7vxybJ0ez7NGq9onn8qij+ xERti8paMmDsXCTk7r/s3mwLsVmvDT8BGnqBLbOkLBJPJzDouSXYs/bhVjdh0ZV7larv mEzPGr2alahaF5UEUe5yb8nMUNmDxp0hzbP3EkOYZQML6Lvh8sW1NdkJ+rEuK+cdJTnS ypig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=sgN+H6iALj1ALXHK5SMsyeddyRr2Rp4bdRjabO5pzQQ=; b=rPcrZIqkZZPqkVAGy4OMDL69i1swPtQERdAGoh7T/rCSc9mdw+AfUrlpmrVEssx0s3 P+1eEb96XOo77cxW9mXwiWqyesZVNPe9NKlw6Zw6lS+8/Kxv3nPswUCMR3FoGJYEDtO2 N0lfcSC61XjLgNT6u/OVAMGuLW34YeR1MS9UHSWI3wxR/YMViYCFAyeJWnW2ykMYp40+ OcDD7ZPfijN+Zi0Vec7Z6XKXwnPWGuJEoVXMRScYU35j8A5g9u96Dj25ZpovAbH+S/k+ uosOX/bdeg2M5aGcwy/m+Kr5j22DK/61gJeGVOKe9BO9V0zu0nisO4TVDGN+hy60tJyy OSrA== X-Gm-Message-State: AOAM530P+BTtxRrh+4OiIkNCKAukJk3ZoLzgVSyhcUqLFWf9CLENQ6Q+ y6Vl8c31cdHJm1/JTg4iCkaD1vB7DvByVA== X-Google-Smtp-Source: ABdhPJwbJ9nkP/6bRE+lWilhGUC8vU7jH+wwclNMj5xmxI7RynMAeFmc9HaU/ZieAOq27UVpUDgnBg== X-Received: by 2002:a05:622a:289:: with SMTP id z9mr5453266qtw.520.1644714724199; Sat, 12 Feb 2022 17:12:04 -0800 (PST) Received: from [192.168.2.100] (pool-72-79-19-93.nwrknj.east.verizon.net. [72.79.19.93]) by smtp.gmail.com with ESMTPSA id c2sm9674489qkp.0.2022.02.12.17.12.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Feb 2022 17:12:03 -0800 (PST) Content-Type: multipart/alternative; boundary="------------XZZOK66UGdk1QUg2CNUEIf0G" Message-ID: Date: Sat, 12 Feb 2022 20:12:02 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Can we go beyond the standard to make Postgres radically better? Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <7117322c-185c-4283-990d-6646d8476409@Spark> <20220210172229.4it7ioddvrtmws37@hjp.at> <20220212195057.amvpuhytkkcndyhh@hjp.at> <20220212213453.tordj3445pgyxonq@hjp.at> <3a50f4fb-3b62-cd5c-a60c-a7211c7f7a5e@pgug.de> From: Mladen Gogala In-Reply-To: <3a50f4fb-3b62-cd5c-a60c-a7211c7f7a5e@pgug.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------XZZOK66UGdk1QUg2CNUEIf0G Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/12/22 19:11, Andreas 'ads' Scherbaum wrote: > The complaint is not about complex queries, or CTEs, or Joins. This is > about simple queries where a user wants to discover - surf - the database > and look into specific tables, but exclude certain columns. More > specifically, > this is when the user types in interactive queries. There is already something very similar to what you are describing: https://www.psycopg.org/docs/cursor.html Each cursor has its description, which consists of the column descriptions. Basically, it's like doing \d on a cursor. Unfortunately, it's not interactive, one has to do some pythong programming in order do to that. Unfortunately, it is not possible to just "describe the cursor", the description becomes available after the "execute" call. Hopefully, I understood you correctly. -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com --------------XZZOK66UGdk1QUg2CNUEIf0G Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 2/12/22 19:11, Andreas 'ads' Scherbaum wrote:
The complaint is not about complex queries, or CTEs, or Joins. This is
about simple queries where a user wants to discover - surf - the database
and look into specific tables, but exclude certain columns. More specifically,
this is when the user types in interactive queries.

There is already something very similar to what you are describing:

https://www.psycopg.org/docs/cursor.html

Each cursor has its description, which consists of the column descriptions. Basically, it's like doing \d on a cursor. Unfortunately, it's not interactive, one has to do some pythong programming in order do to that. Unfortunately, it is not possible to just "describe the cursor", the description becomes available after the "execute" call. Hopefully, I understood you correctly.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
--------------XZZOK66UGdk1QUg2CNUEIf0G--