Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: Gilles Darold <gilles(at)migops(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Date: 2021-10-17 21:48:06
Message-ID: CAMsGm5dt-hmm_LKGu=Taecb+RHEeKrh=Ss7gr2+3C__w_ywoUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 17 Oct 2021 at 17:42, Gilles Darold <gilles(at)migops(dot)com> wrote:

> Yes, my first though was to allow all columns to be unexpandable like a
> table without column, but the the problem is that when you execute
> "SELECT * FROM nada" it returns no rows which is not the case of a table
> with hidden column. I could fix that to return no rows if all columns
> are unexpandable but I think that all column hidden is a nonsens so I
> have prefered to not allow it and an error is raised.
>

Perhaps I misunderstand what you are saying, but a no-columns table
definitely can return rows:

psql (12.2)
Type "help" for help.

postgres=# create table nada ();
CREATE TABLE
postgres=# insert into nada default values;
INSERT 0 1
postgres=# insert into nada default values;
INSERT 0 1
postgres=# table nada;
--
(2 rows)

postgres=#

Note that psql doesn't display a separate line for each row in this case,
but the actual result coming back from the server does contain the
appropriate number of rows.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-10-17 22:38:12 Re: Refactoring pg_dump's getTables()
Previous Message Justin Pryzby 2021-10-17 21:43:15 Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619