On Thu, Apr 23, 2026 at 7:19 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> On 2026-Apr-23, Ashutosh Bapat wrote:
>
> > Name of the property is derived from the name of the column it
> > references if the property name is not specified at the time of
> > creating the property. But these two are different. Changing column
> > name can not be expected to change the property name automatically.
>
> Hmm, but we do rename constraints when we rename indexes, and other
> similar things, don't we?
>
Properties are much closer to the view columns compared to
constraints. I am not able to see the significance of this comparison.
But more important is the reason mentioned in the last sentence of my
response which you have not included in your reply.
"If two elements have the same label, the set of property names
associated with that label is expected to be the same for those two
elements as well." .
A property is associated with an element table through one or more
labels. These labels in turn can be associated with more than one
element. Every element associated with a given label has to define the
same set of properties (names and types). When there is only one
element defining a given property it may appear that the property name
is linked to the column name if the first was derived from the latter.
But that's not true when multiple elements define the same property.
Unlike a constraint or an index, a property is not associated with
only one table - it can be associated with multiple tables. Hence
changing property name as a result of changing name of a column is not
correct.
--
Best Wishes,
Ashutosh Bapat