pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6177: Size field type TEXT
5+ messages / 3 participants
[nested] [flat]
* BUG #6177: Size field type TEXT
@ 2011-08-25 13:33 Claudio Oliveira <claudiomsi@hotmail.com>
2011-08-25 17:14 ` Re: BUG #6177: Size field type TEXT Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 5+ messages in thread
From: Claudio Oliveira @ 2011-08-25 13:33 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 6177
Logged by: Claudio Oliveira
Email address: claudiomsi@hotmail.com
PostgreSQL version: 9.1rc1
Operating system: Windows 7
Description: Size field type TEXT
Details:
Hello,
Use version 8.4 and have no issues with the field type TEXT.
In version 9.1rc1 is limited to 4680 characters.
Where do I change that size?
Thank you.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #6177: Size field type TEXT
2011-08-25 13:33 BUG #6177: Size field type TEXT Claudio Oliveira <claudiomsi@hotmail.com>
@ 2011-08-25 17:14 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-08-25 17:20 ` Re: BUG #6177: Size field type TEXT Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Grittner @ 2011-08-25 17:14 UTC (permalink / raw)
To: Claudio Oliveira <claudiomsi@hotmail.com>; pgsql-bugs
"Claudio Oliveira" <claudiomsi@hotmail.com> wrote:
> Use version 8.4 and have no issues with the field type TEXT.
>
> In version 9.1rc1 is limited to 4680 characters.
>
> Where do I change that size?
test=# create table txt (val text);
CREATE TABLE
test=# insert into txt values (repeat('long string', 1000000));
INSERT 0 1
test=# select char_length(val) from txt;
char_length
-------------
11000000
(1 row)
What makes you think it's limited to 4680 characters?
-Kevin
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #6177: Size field type TEXT
2011-08-25 13:33 BUG #6177: Size field type TEXT Claudio Oliveira <claudiomsi@hotmail.com>
2011-08-25 17:14 ` Re: BUG #6177: Size field type TEXT Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2011-08-25 17:20 ` Bruce Momjian <bruce@momjian.us>
2011-08-25 18:29 ` Re: BUG #6177: Size field type TEXT Claudio Oliveira <claudiomsi@hotmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Momjian @ 2011-08-25 17:20 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: Claudio Oliveira <claudiomsi@hotmail.com>; pgsql-bugs
Kevin Grittner wrote:
> "Claudio Oliveira" <claudiomsi@hotmail.com> wrote:
>
> > Use version 8.4 and have no issues with the field type TEXT.
> >
> > In version 9.1rc1 is limited to 4680 characters.
> >
> > Where do I change that size?
>
> test=# create table txt (val text);
> CREATE TABLE
> test=# insert into txt values (repeat('long string', 1000000));
> INSERT 0 1
> test=# select char_length(val) from txt;
> char_length
> -------------
> 11000000
> (1 row)
>
> What makes you think it's limited to 4680 characters?
My guess is there is an index on the column:
test=> create table txt (val text);
CREATE TABLE
test=> create index i_txt on txt(val);
CREATE INDEX
test=> insert into txt values (repeat('long string', 1000000));
ERROR: index row requires 125944 bytes, maximum size is 8191
You should probably not index long columns but rather index an md5 hash
of the value.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #6177: Size field type TEXT
2011-08-25 13:33 BUG #6177: Size field type TEXT Claudio Oliveira <claudiomsi@hotmail.com>
2011-08-25 17:14 ` Re: BUG #6177: Size field type TEXT Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-08-25 17:20 ` Re: BUG #6177: Size field type TEXT Bruce Momjian <bruce@momjian.us>
@ 2011-08-25 18:29 ` Claudio Oliveira <claudiomsi@hotmail.com>
2011-08-25 20:12 ` Re: BUG #6177: Size field type TEXT Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 5+ messages in thread
From: Claudio Oliveira @ 2011-08-25 18:29 UTC (permalink / raw)
To: bruce@momjian.us; kevin.grittner@wicourts.gov; +Cc: pgsql-bugs
Hello,
I'm doing the test in PGAdmin.
Must be a bug in PGAdmim.
I'm sorry I have not tested in psql
create table txt (val text);
txt insert into values (repeat ('x', 4500));
char_length select (val) from txt;
txt insert into values (repeat ('x', 4685));
char_length select (val) from txt;
select *, length (val) val is null, (val ~ 'x') from txt;
Thank you.
Claudio Oliveira
http://www.msisolucoes.com.br
> From: bruce@momjian.us
> Subject: Re: [BUGS] BUG #6177: Size field type TEXT
> To: Kevin.Grittner@wicourts.gov
> Date: Thu, 25 Aug 2011 13:20:22 -0400
> CC: claudiomsi@hotmail.com; pgsql-bugs@postgresql.org
>
> Kevin Grittner wrote:
> > "Claudio Oliveira" <claudiomsi@hotmail.com> wrote:
> >
> > > Use version 8.4 and have no issues with the field type TEXT.
> > >
> > > In version 9.1rc1 is limited to 4680 characters.
> > >
> > > Where do I change that size?
> >
> > test=# create table txt (val text);
> > CREATE TABLE
> > test=# insert into txt values (repeat('long string', 1000000));
> > INSERT 0 1
> > test=# select char_length(val) from txt;
> > char_length
> > -------------
> > 11000000
> > (1 row)
> >
> > What makes you think it's limited to 4680 characters?
>
> My guess is there is an index on the column:
>
> test=> create table txt (val text);
> CREATE TABLE
> test=> create index i_txt on txt(val);
> CREATE INDEX
> test=> insert into txt values (repeat('long string', 1000000));
> ERROR: index row requires 125944 bytes, maximum size is 8191
>
> You should probably not index long columns but rather index an md5 hash
> of the value.
>
> --
> Bruce Momjian <bruce@momjian.us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + It's impossible for everything to be true. +
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #6177: Size field type TEXT
2011-08-25 13:33 BUG #6177: Size field type TEXT Claudio Oliveira <claudiomsi@hotmail.com>
2011-08-25 17:14 ` Re: BUG #6177: Size field type TEXT Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-08-25 17:20 ` Re: BUG #6177: Size field type TEXT Bruce Momjian <bruce@momjian.us>
2011-08-25 18:29 ` Re: BUG #6177: Size field type TEXT Claudio Oliveira <claudiomsi@hotmail.com>
@ 2011-08-25 20:12 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Grittner @ 2011-08-25 20:12 UTC (permalink / raw)
To: Claudio Oliveira <claudiomsi@hotmail.com>; bruce@momjian.us; +Cc: pgsql-bugs
Claudio Oliveira <claudiomsi@hotmail.com> wrote:
> I'm doing the test in PGAdmin.
>
> Must be a bug in PGAdmim.
>
> I'm sorry I have not tested in psql
>
> create table txt (val text);
> txt insert into values (repeat ('x', 4500));
> char_length select (val) from txt;
> txt insert into values (repeat ('x', 4685));
> char_length select (val) from txt;
>
> select *, length (val) val is null, (val ~ 'x') from txt;
Hmm. Maybe you should try taking this to the pgadmin-support list.
Your script came out sort of mangled in email, and apparently has
funny characters in it because I couldn't copy/paste and modify -- I
had to retype. But this runs fine in psql for me: (Printing the
hundreds of x's omitted from the post, but that looks OK to me,
too.)
test=# create table txt (val text);
CREATE TABLE
test=# insert into txt values (repeat('x', 4500));
INSERT 0 1
test=# insert into txt values (repeat('x', 4685));
INSERT 0 1
test=# select char_length(val), val is null, (val ~ 'x') from txt;
char_length | ?column? | ?column?
-------------+----------+----------
4500 | f | t
4685 | f | t
(2 rows)
-Kevin
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2011-08-25 20:12 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 13:33 BUG #6177: Size field type TEXT Claudio Oliveira <claudiomsi@hotmail.com>
2011-08-25 17:14 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-08-25 17:20 ` Bruce Momjian <bruce@momjian.us>
2011-08-25 18:29 ` Claudio Oliveira <claudiomsi@hotmail.com>
2011-08-25 20:12 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
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