From: | Andrei Lepikhov <lepihov(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: magical eref alias names |
Date: | 2024-11-11 12:41:43 |
Message-ID: | 3d3d2212-7323-4909-b4a2-660c532e5afe@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/8/24 20:33, Robert Haas wrote:
> On Thu, Nov 7, 2024 at 4:38 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The trick there is to keep them predictable, because as I mentioned in
>> my previous response, there may be people depending on knowing what
>> name will be assigned. We're working with a ton of history here,
>> and I'm not really convinced that change will be change for the
>> better.
>
> Yeah, I don't really want to be the one to break somebody's query that
> explicitly references "*VALUES*" or whatever. At least not without a
> better reason than I currently have. If this were just a display
> artifact I think finding some way to clean it up would be pretty
> worthwhile, but I would need a better reason to break working SQL.
Thanks for this topic! Having run into this years ago, I was confused by
eref and alias fields.
I frequently use eref during debugging. Also, knowing the naming
convention makes it much easier to resolve issues with only an
explanation when the user can't provide any other information. I wonder
if other people who work with EXPLAIN a lot already have some sort of
habit here.
I agree that the naming convention can float, but please let it be
stable and predictable.
Also, I'm not sure how other extension developers operate, but in a
handful of mine, I use the fact that eref always contains a name - the
relational model requires a name for each (even intermediate) table and
column, doesn't it?
Also, do not forget that these names can be used in pg_hint_plan hints -
one more reason to make it stable.
--
regards, Andrei Lepikhov
From | Date | Subject | |
---|---|---|---|
Next Message | Nisha Moond | 2024-11-11 12:42:28 | Re: Introduce XID age and inactive timeout based replication slot invalidation |
Previous Message | Benoit Lobréau | 2024-11-11 12:41:04 | Re: Parallel workers stats in pg_stat_database |