On a linux platform you can use:

shp2pgsql -a [...] | sed 's/text/klassen/g' | psql -d <database>

under Windows you can run shp2pgsql -a [...] > file.sql

then edit file.sql & do a search/replace on "text" to "klassen"

then run psql -d <database> -f file.sql



Always assuming the word "text" is only ever used as the column name.
If this is not the case, then you will need to edit the file & check each 
search/replace occurrence.

Or you can use a temporary table (tab2) to insert the data into using 
shp2pgsql, then in your database run:

insert into tab1 select * from tab2;
drop table tab2; 


HTH,

  Brent Wood

--- On Thu, 12/10/09, MisterX <[email protected]> wrote:

> From: MisterX <[email protected]>
> Subject: [postgis-users] shp2pgsql
> To: [email protected]
> Date: Thursday, December 10, 2009, 10:23 PM
> Hi,
> 
> my problem is, that i have a database table with two
> columns with the name klassen ant the_geom. In my shapefile
> the columns called text and the_geom. Now I want to append
> the shapefile on the database table, but how can I tell the
> shapeloader that the column text affiliate to the colum
> klassen?
> 
> shapefile                     database
> Table                        
> --> text                    --> klassen  
> --> the_geom                --> the_geom
>                              
> Can anybody help me with this problem?
> 
> 
> Thank you very much.
> 
> MisterX
> 
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to