Re: [NOVICE] Max length string question (fwd)
Matt Vanderpol wrote:
There is a maximum of about 8k for each record in the table.
There is a maximum of 4k for each varchar that you have.
There is a maximum of 1k that can be passed in any one field on a select
query.
The first two points are documented and make sense. The combination of
the latter two numbers don't make sense because what is the point of
having a maximum length varchar of 4k if you can only populate it with
1k of data?
Also, in psql the query buffer has a max length of 20,000 characters.
when you say passed in a select, you mean returning from the select as in
select reallylongfield from uselesstable;
or do you mean
select into otheruselesstable from uselesstable
where reallylongfield = 'xxxxxxxxxx............. <continues for 1k+ ....';
for the latter, using the copy command ought to do. for the former, is
your varchar field so unique that there isn't a regular expression which
could identify it??? just a thought.
regarding the 20K query bugger (er. i mean buffer) - it'd be on my wish
list that this just defaults to 20K but if someone wanted to increase that
for a psql session, it could be an option such as
psql -qbuffer 64m
just my $0.02.
steve doliov
Matt Vanderpol wrote:
when you say passed in a select, you mean returning from the select as in
select reallylongfield from uselesstable;
or do you mean
select into otheruselesstable from uselesstable
where reallylongfield = 'xxxxxxxxxx............. <continues for 1k+ ....';There is a maximum of 1k that can be passed in any one field on a select
query.
I'm sorry, I mistyped myself. I meant to say that there is a 1k max for
inserts and updates, not for selects.
Matt
Import Notes
Resolved by subject fallback