Re: [GENERAL] "Number of columns exceed limit" on a hierarchy of views

2009-08-21 Thread Alvaro Herrera
Eric Schwarzenbach wrote: > In other words, if you have > > create view C select * from A join B on (A.foo = B.foo); > create view D select * from C join E on (C.foo= E.foo); > and you execute some select query on D, does it necessarily join A and B > before joining the result to E, or might it d

Re: [GENERAL] "Number of columns exceed limit" on a hierarchy of views

2009-08-21 Thread Eric Schwarzenbach
Tom Lane wrote: > David Waller 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 out

[GENERAL] "Number of columns exceed limit" on a hierarchy of views

2009-08-21 Thread David Waller
Hello all, 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. The problem seems to be my use of views. The largest table in the database is 500 columns wide.

Re: [GENERAL] "Number of columns exceed limit" on a hierarchy of views

2009-08-21 Thread Tom Lane
David Waller 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 ste

[GENERAL] "Number of columns exceed limit" on a hierarchy of views

2009-08-21 Thread David Waller
Hello all, 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. The problem seems to be my use of views. The largest table in the database is 500 columns wide.