pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryan \(Mailing Lists\) <bryan_lists@netmeme.org>
To: pgsql-interfaces@postgresql.org
Subject: Re: JDBC and long TEXT fields
Date: Sat, 2 Dec 2000 21:40:46 -0700
Message-ID: <00db01c05ce3$341f1e00$54ed90cc@netmeme.org> (raw)
References: <200012011652.WAA08483@tcs.com>
	<012d01c05c66$0108d6f0$c6290218@workhorse>
	<002901c05cd9$cd8cf6c0$54ed90cc@netmeme.org>
	<3A29CBFC.F28FC13C@alumni.caltech.edu>

Looking at the User's Guide, Chapter 3, Character Types:

http://www.postgresql.org/docs/user/x1069.htm

It describes char, char(n), text, and varchar(n).

char is described as "single character"
char(n) is described as "fixed length"
text is described as "variable-length"
varchar(n) is described as "variable-length with limit"

Since three out of four of these types are described as having limits, my
interpretation is that the TEXT type does not have any limit. Evidently that
was a faulty assumption on my part, but the docs could stand to be a little
more clear.

Docs aside, I'm looking for a data type that will hold lengthy stings, > 8k.
Evidently a blob is what I need to use? But I don't see blobs listed as a
data type under Table 3-1, "Postgres Data Types".

http://www.postgresql.org/docs/user/datatype.htm

More direction would be appreciated..

Thanks again in advance,
Bryan


----- Original Message -----
From: "Thomas Lockhart" <lockhart@alumni.caltech.edu>
To: "Bryan (Mailing Lists)" <bryan_lists@netmeme.org>
Cc: <pgsql-interfaces@postgresql.org>
Sent: Saturday, December 02, 2000 9:28 PM
Subject: Re: [INTERFACES] JDBC and long TEXT fields


> > I am trying to insert rows into a table containing a field of type
"TEXT".
> > The documentation says there is no limit to the size of this field; yet,
> > when I try to insert or update a row with a field contents of around
10k, I
> > get an error from the JDBC driver...
>
> As Greg points out, there is an upper limit. I would hope that the docs
> say that TEXT has no *fixed* limit, unlike SQL9x types char() and
> varchar().
>
> Let us know if that is not what the docs say (and where they don't say
> that ;) and we'll get them fixed up. Though for the next release there
> is only a huge upper limit, in principle.
>
>                    - Thomas




view thread (8+ messages)  latest in thread

Message-ID: <00db01c05ce3$341f1e00$54ed90cc@netmeme.org>
Permalink:  ../00db01c05ce3$341f1e00$54ed90cc@netmeme.org/
Also on:    postgresql.org/message-id/00db01c05ce3$341f1e00$54ed90cc@netmeme.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: bryan_lists@netmeme.org
  Subject: Re: JDBC and long TEXT fields
  In-Reply-To: <00db01c05ce3$341f1e00$54ed90cc@netmeme.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox