Re: "Number of columns exceed limit" on a hierarchy of views - Mailing list pgsql-general

From Tom Lane
Subject Re: "Number of columns exceed limit" on a hierarchy of views
Date
Msg-id 2760.1250862298@sss.pgh.pa.us
Whole thread Raw
In response to "Number of columns exceed limit" on a hierarchy of views  (David Waller <daw138a-postgres@yahoo.co.uk>)
Responses Re: "Number of columns exceed limit" on a hierarchy of views  (Eric Schwarzenbach <subscriber@blackbrook.org>)
List pgsql-general
David Waller <daw138a-postgres@yahoo.co.uk> writes:
> I'm struggling with a database query that under some circumstances returns the error "ERROR:  number of columns
(2053)exceeds limit (1664)".  Confusingly, though, no table is that wide. 

This limit would be enforced against the output rows of any intermediate
join step.  Without looking at EXPLAIN plans it's hard to say exactly
what's biting you, but it doesn't surprise me a a whole lot that joining
multiple 500-column tables would get you into trouble.  I'd suggest
reconsidering your table schemas.  Array columns might help.

            regards, tom lane

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Questions about encoding between two databases
Next
From: Tom Lane
Date:
Subject: Re: "ownership" of sequences, pseudo random unique id