Re: PostgreSQL Limits: maximum number of columns in SELECT result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amul Sul <sulamul(at)gmail(dot)com>
Cc: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL Limits: maximum number of columns in SELECT result
Date: 2022-05-31 14:16:45
Message-ID: 170927.1654006605@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amul Sul <sulamul(at)gmail(dot)com> writes:
> On Tue, May 31, 2022 at 12:46 PM Vladimir Sitnikov
> <sitnikov(dot)vladimir(at)gmail(dot)com> wrote:
>> I suggest that the limit of "1664 columns per tuple" (or whatever is the right term) should be added
>> to the list at https://www.postgresql.org/docs/current/limits.html e.g. after "columns per table".

We've generally felt that the existing "columns per table" limit is
sufficient detail here.

> Rather, I think the "columns per table" limit needs to be updated to 1664.

That number is not wrong. See MaxTupleAttributeNumber and
MaxHeapAttributeNumber:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/access/htup_details.h;h=51a60eda088578188b41f4506f6053c2fb77ef0b;hb=HEAD#l23

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2022-05-31 14:27:16 Re: PostgreSQL Limits: maximum number of columns in SELECT result
Previous Message Amit Kapila 2022-05-31 14:13:50 Re: Ignore heap rewrites for materialized views in logical replication