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

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, 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-06 02:22:14
Message-ID: CACJufxEyyXCVdSiuQybVrJDLs1fB_ZqAVm5dKwPM7yxLureHAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

per above discussion:
for TupleDescInitEntry, TupleDescInitBuiltinEntry, I didn't change the
signature of it.
but i added:

if (attdim != 0)
elog(ERROR, "attdim should be zero");

otherwise it may have "unused parameter" warnings?

for the same reason in TypeCreate, I added:
if (typNDims != 0)
elog(ERROR, "typNDims should be zero");

i aslo changed TypeCreate typNDims related comments.
TupleDescInitEntry, TupleDescInitBuiltinEntry comments didn't say much
about attdim.

so overall the change is less pervasive, it would be easier to review.

Attachment Content-Type Size
v2-0001-remove-pg_attribute-attndims-and-pg_type-typndims.patch text/x-patch 17.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2024-12-06 02:44:20 Re: MinGW compiler warnings in ecpg tests
Previous Message Tom Lane 2024-12-06 01:09:18 Re: Assert failure on running a completed portal again