From: | Andrew Ayers <aayers(at)eldocomp(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: TEXT datatype and VB6... |
Date: | 2003-03-25 21:28:59 |
Message-ID: | 3E80CA1B.4080107@eldocomp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
scott.marlowe wrote:
> To add to this, is it possible to set it to varchar(yourlimithere) for
> what you need? My guess is if the limit is very high (over 8192 or so)
> then the DAO methods may break in strange ways.
Well, it is looking like I am going to have to do that, and just see
what happens. Looking at the data on my Access DB, and looking at the
max size for my Memo-type fields, the largest is at about 87K (that is,
on one particular record, it has 87K worth of data in the field).
It hasn't choked on this size with the Access DB and DAO - not sure what
it will do with ODBC, PostgreSQL, DAO, etc - it will just have to be a
"try-and-see" type thing.
Since this is the route I am taking (that is, using a large VARCHAR
rather than TEXT for these fields), I did some experimenting:
I created a table in PostgreSQL with two fields, one a sequential number
field, the other a VARCHAR with various sizing.
In the documentation I have seen for PostgreSQL and VARCHAR, the
max-size is said to be 10,485,760 bytes - and PostgreSQL seems to allow
you to make a VARCHAR field on a table this size.
However, when trying to access it in VB, VB would get an application
error upon trying to select the field, and die. I found that if I
dropped the size down to 1 meg (1048576 - ie 1024^2), it stopped doing
that, and updated the field properly. This size of 1 meg is still
approximately 12x larger than my largest field above, so this limit
seems reasonable.
I did try larger limits, to see where and how things acted - somewhere
around 1.4 to 1.5 meg, the error would still occur. Below 1.4 meg, the
client machine (my desktop machine is a PII400 with 384 meg) would churn
and churn (what I mean by this is that it seemed to be hitting some kind
of caching or virtual memory limit or something), and eventually the
connection would time-out (I suppose that is what happened, anyhow).
Dropping it further to 1.3 meg, a small amount of churning would occur,
but the update would go through. Below that amount, very little
observable (that is, to the user) churning would happen. So, I think I
will stick to the 1 meg (1048576 bytes) limit for now.
I still find it disconcerting that the TEXT field type won't update the
same way - I have a feeling it is the ODBC driver, and not anything
else. Unfortunately I have no way to test and verify this, and I don't
have an alternate driver to try...
Andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Dennis Gearon | 2003-03-25 21:45:50 | Re: trigger question. |
Previous Message | scott.marlowe | 2003-03-25 21:15:21 | Re: log rotation script for server output |