Thread: column limit?

column limit?

From
"Johnson, Shaunn"
Date:

Howdy:

Trying to looking for this in the docs, but, can someone clue me
in for the direction for column limit?  I'm trying to build
a table with, say, 50+ columns (all but 2 of them are integer) and
getting some error (the error itself is ambiguous as it refers to
"'").

Is there a limit as to how many columns a table can have?
If so, what is it (or, where is the docs that explains
that stuff) ?

Thanks!

-X

Re: column limit?

From
Robert Treat
Date:
From http://www.postgresql.org/idocs/index.php?sql-createtable.html

"A table cannot have more than 1600 columns."



Robert Treat

On Tue, 2002-07-23 at 17:51, Johnson, Shaunn wrote:
> Howdy:
>
> Trying to looking for this in the docs, but, can someone clue me
> in for the direction for column limit?  I'm trying to build
> a table with, say, 50+ columns (all but 2 of them are integer) and
> getting some error (the error itself is ambiguous as it refers to
> "'").
>
> Is there a limit as to how many columns a table can have?
> If so, what is it (or, where is the docs that explains
> that stuff) ?
>
> Thanks!
>
> -X
>




Re: column limit?

From
Tom Lane
Date:
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> Trying to looking for this in the docs, but, can someone clue me
> in for the direction for column limit?  I'm trying to build
> a table with, say, 50+ columns (all but 2 of them are integer) and
> getting some error (the error itself is ambiguous as it refers to
> "'").

As Robert pointed out, you are nowhere near any limit.  This is probably
a simple syntax error, but I don't doubt that it's hard to find in such
a large command :-(.

There is a problem with the parser in releases through 7.2 (it's fixed
for 7.3) in that in some situations, "parse error near foo" messages
will quote only a part of a token, rather than the whole token.  I
suspect that this message is trying to point at some string literal
('foo') in your command.

            regards, tom lane