[postgis-users] create tables smarter

Andreas Laggner andreas.laggner at vti.bund.de
Wed Jun 4 07:29:05 PDT 2008


Hello list,

i am searching for a solution for creating tables with less typing. I do
not want to type every column i want to have in my new table, especially
if column names will not change! I cannot use the postgresql "create
table tablename as select * from" because of the geometry column (with
this command i will insert all data the_geom included, but i will not
have the entries, that addgeometrycolumn does). Would be fine to create
the columns only first, then delete column the_geom, than execute
addgeometrycolumn and than execute the insert......but i do not know how
to create only the columns with *.
I am also happy about other approaches to solve the problem  ;-)

cheers      Andreas



-- 

Dipl. Geoökologe Andreas Laggner

Institut für Agrarrelevante Klimaforschung (AK) des vTI
Johann Heinrich von Thünen-Institut (vTI),
Bundesforschungsinstitut für Ländliche Räume, Wald und Fischerei

Institute of Agricultural Climate Research (AK) of the vTI
Johann Heinrich von Thünen-Institute (vTI),
Federal Research Institute for Rural Areas, Forestry and Fisheries

Bundesallee 50
D-38116 Braunschweig

Tel.: (+49) (0)531 596 2636
E-mail: andreas.laggner at vti.bund.de
Homepage: http://www.vti.bund.de




More information about the postgis-users mailing list