Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Martin Gainty
euvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: ge...@tbstbs.net > To: s...@samason.me.uk; t...@sss.pgh.pa.us > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Maximum number of columns in a

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Gerry Scales
assistance. Gerry - Original Message - From: "Tom Lane" To: "Sam Mason" Cc: Sent: Sunday, April 12, 2009 9:26 AM Subject: Re: [GENERAL] Maximum number of columns in a table Sam Mason writes: Just out of interest; what would happen if you had:

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Tom Lane
Sam Mason writes: > Just out of interest; what would happen if you had: > CREATE TABLE wider ( > col0001 TEXT, > col0002 TEXT, > -- [ ] > col9998 TEXT, > col TEXT > ); > CREATE TABLE store ( > pk1 INTEGER, > pk2 TEXT, > PRIMARY KEY (pk1,pk2), >

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Sam Mason
On Sat, Apr 11, 2009 at 05:43:06PM -0400, Tom Lane wrote: > In principle, every varchar column could get toasted into an 18-byte > (more in pre-8.3 versions) TOAST pointer, meaning you could get to > somewhere around 450 columns in 8K regardless of how wide they are. Wow, never realised it was tha

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Gerry Scales
Thanks Sam, that's excellent advice. If a developer doesn't jump in with a definitive formula, that is the path I will take. Regards Gerry - Original Message - From: "Sam Mason" To: Sent: Sunday, April 12, 2009 7:23 AM Subject: Re: [GENERAL] Maximum number o

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Tom Lane
Sam Mason writes: > On Sun, Apr 12, 2009 at 05:33:35AM +1000, Gerry Scales wrote: >> I have a situation where I need to load tables from another database >> which may theoretically contain up to 1000 columns per table and this >> information will determine whether I need to rebuild PostgreSQL with

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Sam Mason
On Sun, Apr 12, 2009 at 05:33:35AM +1000, Gerry Scales wrote: > The FAQs state "Maximum number of columns in a table? 250-1600 > depending on column types". > > Is there a location which gives instructions for calculating whether a > number of columns of different types can be accommodated? > > I

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Gerry Scales
This is a generic problem - I have no control over the data and need to solve the problem by programming without analyzing each application. However, I do have control over the way the data is stored and can use user-defined types. I guess I could partially restate the problem as: How many varle

Re: [GENERAL] Maximum number of columns in a table

2009-04-11 Thread Martin Gainty
ccepter aucune responsabilité pour le contenu fourni. From: ge...@tbstbs.net To: pgsql-general@postgresql.org Subject: [GENERAL] Maximum number of columns in a table Date: Sun, 12 Apr 2009 05:33:35 +1000 The FAQs state "Maximum number of columns in a table? 250-1600 depending

[GENERAL] Maximum number of columns in a table

2009-04-11 Thread Gerry Scales
The FAQs state "Maximum number of columns in a table? 250-1600 depending on column types". Is there a location which gives instructions for calculating whether a number of columns of different types can be accommodated? I have a situation where I need to load tables from another database which