Re: attndims, typndims still not enforced, but make the value within a sane threshold

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, jian he <jian(dot)universality(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: attndims, typndims still not enforced, but make the value within a sane threshold
Date: 2024-12-26 22:08:36
Message-ID: 2003574.1735250916@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> So, if users are referencing attndims and the values are not accurate,
> how useful are they? I was suggesting removal so people would stop
> relying on inaccurate information, or we correct attndims to be
> accurate. Allowing people to continue relying on inaccurate information
> seems like the worst of all options.

I think removal is not happening. The documentation for attndims
already says

Number of dimensions, if the column is an array type; otherwise
0. (Presently, the number of dimensions of an array is not
enforced, so any nonzero value effectively means “it's an array”.)

and as far as I know that is completely correct. (Hence, your gripe
is not that it's not "accurate", rather that it's not "precise".)

There isn't a comparable disclaimer under typndims, but there probably
should be.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2024-12-26 23:07:45 Re: attndims, typndims still not enforced, but make the value within a sane threshold
Previous Message David Rowley 2024-12-26 21:53:51 Re: Removing unused parameter in compute_expr_stats