[postgis-devel] [PostGIS] #1465: loader/Latin1 regression failure (NetBSD, postgresql 8.4.10)

PostGIS trac at osgeo.org
Fri Jan 13 15:37:15 PST 2012


#1465: loader/Latin1 regression failure (NetBSD, postgresql 8.4.10)
---------------------------+------------------------------------------------
 Reporter:  gdt            |       Owner:  mcayland     
     Type:  defect         |      Status:  new          
 Priority:  medium         |   Milestone:  PostGIS 2.0.0
Component:  loader/dumper  |     Version:  trunk        
 Keywords:                 |  
---------------------------+------------------------------------------------
 {{{
 $ ./run_test loader/Latin1
 Creating spatial db postgis_reg
 TMPDIR is /tmp/pgis_reg_20444
 PATH is
 /home/gdt/ccache:/usr/pkg/java/sun-6/bin:/usr/amanda/bin:/usr/amanda/sbin:/home/gdt/bin:/home/gdt/bin/i386-NetBSD:/usr/y0/sbin:/usr/y0/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/pilot/bin

  PostgreSQL 8.4.10 on i386--netbsdelf, compiled by GCC gcc (GCC) 4.1.3
 20080704 prerelease (NetBSD nb3 20111107), 32-bit
  Postgis 2.0.0SVN - 2012-01-13 20:25:58
    GEOS: 3.3.2-CAPI-1.7.2
    PROJ: Rel. 4.7.1, 23 September 2009

 Running tests

  loader/Latin1 ... failed ( wkb test: running shp2pgsql output:
 /tmp/pgis_reg_20444/loader.err)
  uninstall .. ok (3697)

 Run tests: 2
 Failed: 1
 }}}

 {{{
 SET CLIENT_ENCODING TO UTF8;
 SET STANDARD_CONFORMING_STRINGS TO ON;
 BEGIN;
 CREATE TABLE "loadedshp" (gid serial,
 "address" varchar(32));
 ALTER TABLE "loadedshp" ADD PRIMARY KEY (gid);
 INSERT INTO "loadedshp" ("address") VALUES ('Tårneby in Våler I Solør
 kommune');
 COMMIT;
 }}}

 {{{
 SET
 SET
 BEGIN
 psql:/tmp/pgis_reg_20444/loader.out:5: NOTICE:  CREATE TABLE will create
 implicit sequence "loadedshp_gid_seq" for serial column "loadedshp.gid"
 CREATE TABLE
 psql:/tmp/pgis_reg_20444/loader.out:6: NOTICE:  ALTER TABLE / ADD PRIMARY
 KEY will create implicit index "loadedshp_pkey" for table "loadedshp"
 ALTER TABLE
 psql:/tmp/pgis_reg_20444/loader.out:7: ERROR:  value too long for type
 character varying(32)
 }}}

 The issue might be that the encoding of the string is more than 32:

 regress > wc
 Tårneby in Våler I Solør kommune
        1       6      36
 (which is 35, since I added a return).


 I don't know enough about beyond-ASCII character sets to understand
 what's wrong, but the loader-generated SQL looks ok.

 Is varchar(N) supposed to handle N bytes, or N possibly-wide
 characters?

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1465>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list