I don't think this is actually a postgis issue, I think it is more of a general 
postgresql problem, perhaps you should post it to the postgresql list...

Is that the entire error message? does it not specify which column is too long? 
looking at the definitions of your tables, which columns are declared as char
(6)? Perhaps you are converting a long number into a character value? It's hard 
to read your query without knowing the types of all the columns.

Chris

Quoting Oscar Testa <otesta@speedy.com.ar>:

> 
> I have posted this message a week ago, and i hav no response.  Please i need
> to resolve this problem !!!!! Help!!!!!
> 
> 
> 
> I have the next problem.  I modify via PHP/Mapscript the data portion of a
> .map file.  The resulting SQL is:
> 
> SELECT
> nivel_imp::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text
> from (select localidad_plano.oid as oid, localidad_plano.the_geom as
> the_geom, web_implem_grado.grado as nivel_imp from localidad_plano,
> inf_institucion, web_implem, web_implem_grado WHERE
> localidad_plano.codigopostal = bpchar(inf_institucion.codigo_postal,10) AND
> inf_institucion.id_institucion = web_implem.id_institucion AND
> web_implem.pampa = web_implem_grado.grado ) AS foo WHERE the_geom &&
> setSRID('BOX3D(-73.597264 -57.9529488695652,-53.562864
> -18.8021391304348)'::BOX3D, 4326 )
> 
> but i have the next error when i try to run this sql in pgadmin
> 
> "value too long for type character(6).
> 
> I'm using PostgreSQL 7.2.3 and PostGIS 0.7.3 in a win2k machine.
> In other machines with the same sql run properly.
> 
> Any idea??
> 
> Regards
> Osca
> 





