[postgis-users] Please help - Value too long

Oscar Testa otesta at speedy.com.ar
Tue May 13 06:07:59 PDT 2003


Ok, i will try to be more explicit:

> You are most likely joining a column that is char(6) with a column that
> is larger, say char(10).
> This is mostly likely in the "localidad_plano.codigopostal =
> bpchar(inf_institucion.codigo_postal,10)" clause.

If i run this sql the error does not appear

SELECT

nivel_imp::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::te
xt
 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

but when i add the part of

WHERE the_geom &&
 setSRID('BOX3D(-73.597264 -57.9529488695652,-53.562864
 -18.8021391304348)'::BOX3D, 4326 )

the value too long appears.

Any idea??

Regards
Oscar
----- Original Message ----- 
From: "David Blasby" <dblasby at refractions.net>
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Sent: Monday, May 12, 2003 4:02 PM
Subject: Re: [postgis-users] Please help - Value too long


> Oscar Testa wrote:
>
> > SELECT
> >
nivel_imp::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::te
xt
> > 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).
>
> You are most likely joining a column that is char(6) with a column that
> is larger, say char(10).
> This is mostly likely in the "localidad_plano.codigopostal =
> bpchar(inf_institucion.codigo_postal,10)" clause.
>
> Does that help?  If not, look at the definition of
> "localidad_plano.codigopostal" - its probably char(6).
>  "bpchar(inf_institucion.codigo_postal,10)" is probably making a char(10).
> Something like "text(localidad_plano.codigopostal) =
> text(bpchar(inf_institucion.codigo_postal,10))" might work.
>
> dave
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list