Re: Improving inferred query column names - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Improving inferred query column names
Date
Msg-id 295949.1677101931@sss.pgh.pa.us
Whole thread Raw
In response to Re: Improving inferred query column names  (Vladimir Churyukin <vladimir@churyukin.com>)
Responses Re: Improving inferred query column names
List pgsql-hackers
Vladimir Churyukin <vladimir@churyukin.com> writes:
> It doesn't need to be perfect, but it needs to be consistent. So far you
> proposed a rule to replace () with _. What is the plan for expressions, how
> to convert them to names (with deduplication I guess?, because there could
> be 2 similar expressions mapped to the same name potentially).

I do not think we need to do anything for arbitrary expressions.
The proposal so far was just to handle a function call wrapped
around something else by converting to the function name followed
by whatever we'd emit for the something else.  You cannot realistically
handle, say, operator expressions without emitting names that will
require quoting, which doesn't seem attractive.

And no, deduplication isn't on the table at all here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size
Next
From: Andrew Dunstan
Date:
Subject: Re: pgindent vs. git whitespace check