[GRASSLIST:6141] RE: NVIZ problem

Glynn Clements glynn.clements at virgin.net
Fri Apr 25 17:53:39 EDT 2003


Nico Hardebol wrote:

> possibly related to this newest version I met other problems, with which I
> was not confronted while installing grass5.0.0 under suse 7.2.
> grass.postgresql does not compile ...

> 		make[2]: Entering directory
> `/home/nico/grass5.0.2/src.garden/grass.postgresql/g.column.pg'
> 
> cc -I/home/nico/grass5.0.2/src/include -g -O2   -I/usr/local/pgsql/include -
> Wall -DPACKAGE=\""g.column.pg"\"  -c main.c -o
> OBJ.i686-pc-linux-gnu/main.o
> 		main.c:83:30: missing terminating " character

This is a bug in g.column.pg. A string literal contains embedded
newlines; gcc used to allow this, but presumably the latest versions
don't.

Try the attached patch.

> I also have problems while attaching pgaccess to the postgresSQL database I
> don't know if this is a comparable problem with shared libraries - I'll
> request the postgreSQL-list
> 	version 98.7:
> 		nico at laptop:/usr/local/pgaccess> ./pgaccess
> 		Error in startup script: couldn't load file "libpgtcl.so": libpgtcl.so:
> cannot open shared object file: No such file or directory

This isn't relevant to GRASS.

pgaccess is a Tcl/Tk program for accessing PostgreSQL databases. 
libpgtcl is a Tcl/Tk extension which provides Tcl/Tk commands for
accessing PostgreSQL databases, and is required by pgaccess; no part
of GRASS needs it.

-- 
Glynn Clements <glynn.clements at virgin.net>

-------------- next part --------------
--- src.garden/grass.postgresql/g.column.pg/main.c~	Sun Nov 24 21:12:13 2002
+++ src.garden/grass.postgresql/g.column.pg/main.c	Fri Apr 25 22:48:58 2003
@@ -61,25 +61,25 @@
     }
 
     if (flag->answer) {
-	sprintf(SQL, "SELECT a.attname as ColumnName, t.typname as Type,
-		  a.attlen as Length,
-		  a.atttypmod as \"Mod_Length\"
-		 FROM pg_class c, pg_attribute a, pg_type t
-		 WHERE  c.relname = '%s' 
-		  and a.attnum > 0
-		  and a.attrelid = c.oid
-		  and a.atttypid = t.oid
-		  order by attnum", tbl->answer);
+	sprintf(SQL, "SELECT a.attname as ColumnName, t.typname as Type,"
+		"  a.attlen as Length,"
+		"  a.atttypmod as \"Mod_Length\""
+		" FROM pg_class c, pg_attribute a, pg_type t"
+		" WHERE  c.relname = '%s' "
+		"  and a.attnum > 0"
+		"  and a.attrelid = c.oid"
+		"  and a.atttypid = t.oid"
+		"  order by attnum", tbl->answer);
 
     }
     else {
 	/* no column descriptions */
-	sprintf(SQL, "SELECT a.attname as ColumnName
-		 FROM pg_class c, pg_attribute a
-		 WHERE  c.relname = '%s' 
-		  and a.attnum > 0
-		  and a.attrelid = c.oid
-		  order by attnum", tbl->answer);
+	sprintf(SQL, "SELECT a.attname as ColumnName"
+		" FROM pg_class c, pg_attribute a"
+		" WHERE  c.relname = '%s' "
+		"  and a.attnum > 0"
+		"  and a.attrelid = c.oid"
+		"  order by attnum", tbl->answer);
     }
 
 


More information about the grass-user mailing list