Re: [GENERAL] maximal length of varchar

From: guenther mair <mairg(at)efferd(dot)nettz(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] maximal length of varchar
Date: 1999-06-24 13:51:47
Message-ID: Pine.BSF.3.95q.990624154204.24879A-100000@efferd.nettz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> prova=> create table a1(a varchar(99999));
> ERROR: length for type 'varchar' cannot exceed 8064
> prova=> create table a1(a varchar(8064));
> CREATE

thanks, for this quick answer!

i did the test by myself and found out, that on the my system (freebsd
3.2) where i do actualy my tests, varchar is limited to 4096. this creates
the problem of plattfrom dependence.

what length has the text field?
-> i tried a insert-command with some 10000 signs for one text-field
-> i got a "PQsendQuery() -- query is too long. Maximum length is 8191"

hmpf. so maximum length may not exceed 8191 signs in any case. this causes
textfields to be reduced to a variable length, which depends on the amount
of your table-fields; just think of these two cases:

a table with 50 fields and a realy big textfield

a table with 2 fields where one is a realy big textfield

in the first case the textfield has to be smaller, since i can't exceed
the maximum query length of 8191 signs.....

now what? :)

thanks,

guenther

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1999-06-24 15:39:40 Re: [GENERAL] Limitation
Previous Message José Soares 1999-06-24 13:25:53 Re: [GENERAL] maximal length of varchar