Re: Starnge things with big datas...

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: "F(dot) BROUARD / SQLpro" <sqlpro(at)club-internet(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Starnge things with big datas...
Date: 2012-04-21 14:54:40
Message-ID: 1335020080.2322.13.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 2012-04-21 at 16:17 +0200, F. BROUARD / SQLpro wrote:
> Hi there,
>
> "PostgreSQL 9.1.2, compiled by Visual C++ build 1500, 64-bit"
> catalog version : PG_9.1_201105231
>
> --> the table :
>
> CREATE TABLE T_TEST_TAILLE
> (TTT_ID SERIAL NOT NULL PRIMARY KEY,
> TTT_DATAFIX CHAR(16),
> TTT_DATAVAR VARCHAR(16),
> TTT_DATAVARBIG VARCHAR(6000));
>
> --> the inserts :
>
> INSERT INTO T_TEST_TAILLE (TTT_DATAFIX, TTT_DATAVAR, TTT_DATAVARBIG)
> SELECT NULL, NULL, NULL
> UNION ALL SELECT '', '', ''
> UNION ALL SELECT '12345678', '12345678', REPEAT('*', 3000)
> UNION ALL SELECT '1234567890123456', '1234567890123456',
> REPEAT('*', 6000)
>
> --> the query
>
> SELECT *, pg_column_size(TTT_DATAFIX),
> char_length(TTT_DATAFIX),
> octet_length(TTT_DATAFIX),
> pg_column_size(TTT_DATAVAR),
> char_length(TTT_DATAVAR),
> octet_length(TTT_DATAFIX),
> pg_column_size(TTT_DATAVARBIG),
> char_length(TTT_DATAVARBIG),
> octet_length(TTT_DATAFIX)
> FROM T_TEST_TAILLE;
>
> !!! PROBLEM !!!
>
> --> at this time the 4th row show nothing in ttt_datavarbig column...
> it is supposed to retrive the long '********************* ... '
> 6000 characters !
>
> What happened ?
>

Let me guess. You used pgAdmin, right? The widget pgAdmin uses on its
query tool doesn't allow us to show really big values. Sometimes, it
just doesn't display the cell at all. Kinda lame, and I hope I'll be
able to fix this one day.

Try with psql as Andreas told you, you'll see your long value.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Condor 2012-04-21 15:38:57 Re: Problem with reading data from standby server ?
Previous Message Andreas Kretschmer 2012-04-21 14:36:58 Re: Starnge things with big datas...