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

From: Dave Cramer <davecramer(at)postgres(dot)rocks>
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:10:13
Message-ID: CADK3HH+zsL5bEPv7i8dOEgGm1D4k7b6RmmVUqL9VgqbFnihoPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
>
>
> On Tue, 31 May 2022 at 09:56, Amul Sul <sulamul(at)gmail(dot)com> wrote:
>
>> On Tue, May 31, 2022 at 12:46 PM Vladimir Sitnikov
>> <sitnikov(dot)vladimir(at)gmail(dot)com> wrote:
>> >
>> > Hi,
>> >
>> > Today I hit "ERROR: target lists can have at most 1664 entries", and I
>> was surprised the limit was not documented.
>> >
>> > 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".
>> >
>>
>> Rather, I think the "columns per table" limit needs to be updated to 1664.
>>
>
> Actually that is correct. Columns per table is MaxHeapAttributeNumber
> which is 1600.
>
> MaxTupleAttributeNumber is 1664 and is the limit of user columns in a
> tuple.
>
> Dave
>

Attached is a patch to limits.sgml. I'm not sure this is where it belongs,
as it's not a physical limit per-se but I am not familiar enough with the
docs to propose another location.

Note this was suggested by Vladimir.

see attached

Attachment Content-Type Size
columns_per_tuple.patch application/octet-stream 433 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-05-31 14:13:50 Re: Ignore heap rewrites for materialized views in logical replication
Previous Message Bruce Momjian 2022-05-31 14:06:35 Re: Multi-Master Logical Replication