Re: Proposition for autoname columns - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Proposition for autoname columns
Date
Msg-id 20201112170224.GD25584@momjian.us
Whole thread Raw
In response to Re: Proposition for autoname columns  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, Nov 12, 2020 at 11:32:49AM -0500, Andrew Dunstan wrote:
> On 11/12/20 11:12 AM, David G. Johnston wrote:
> > IMO It no worse than today's:
> >
> > select count(*), count(*) from (values (1), (2)) vals (v);
> > count | count
> > 2 | 2
> >
> 
> 
> I guess the difference here is that there's an extra level of
> indirection. So
> 
> select x, j->>'x', j->>x from mytable
> 
> would have 3 result columns all named x.

Yeah, I feel it would have to be something a user specifically asks for,
and we would have to say it would be the first or a random match of one
of the keys.  Ultimately, it might be so awkward as to be useless.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Proposition for autoname columns
Next
From: "David G. Johnston"
Date:
Subject: Re: Proposition for autoname columns