[postgis-users] populating a table
Malm Paul
paul.malm at saabgroup.com
Mon Mar 12 07:05:50 PDT 2007
I did createlang plpgsql yourtestdatabase: and got an answer that it was
already installed
But I can not find any lwpostgis.sql spatial_ref_sys.sql on the disc.
I'm on Windows XP. Yesterday I was able to insert Gis objects, but not
today. So I droped my database and created a new one via pgAdmin III
(All the same).
Since I did not find any of the SQL files you wrote about I Uninstalled
PostGis, to try to install it again but the installation program
reported that post was already installed...
Could you please attach the sql files in a mail (if you got the time and
patience).
Kind regards,
/Paul
________________________________
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Obe,
Regina
Sent: den 12 mars 2007 13:54
To: PostGIS Users Discussion
Subject: RE: [postgis-users] populating a table
Depends on what OS you are running? But generally you load the postgis
functions separately and you have to make sure you have plpgsql enabled
in your database.
If you have the .so files (on unix) or the .dll files on windows then
you just have to load the functions in your db with
createlang plpgsql yourtestdatabase
psql -d yourtestdatabase -f lwpostgis.sql
psql -d yourtestdatabase -f spatial_ref_sys.sql
If you don't have the functions then its a bit more involved. The
lwpostgis.sql and spatial_ref_sys.sql in a postgresql install
prepackaged with postgis are usually located in the share\contrib and
share\contrib\postgis folders.
________________________________
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Malm
Paul
Sent: Monday, March 12, 2007 8:42 AM
To: PostGIS Users Discussion
Subject: RE: [postgis-users] populating a table
Yes it is a new database, I can also see that the AddGeometryColumn has
a green underscore in the SQL window in pgadmin: SELECT
AddGeometryColumn('public','h1707640_cul_transl','the_geom','-1','MULTIL
INESTRING',2);
I have not seen any error messages when I created the database but I've
not explicit loaded any functions as AddGeometryColumn. Do you know how
I do this or where to read about it?
Thanks!
Paul
________________________________
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Obe,
Regina
Sent: den 12 mars 2007 13:22
To: PostGIS Users Discussion
Subject: RE: [postgis-users] populating a table
Is this a new database you are loading into? Sounds like you are
missing the addgeometrycolumn function perhaps because load of postgis
functions failed when creating the database or you didn't load them.
Other possibility is that you have the addgeometrycolumn function, but
it is not in your default schema or one of your search schemas.
________________________________
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Malm
Paul
Sent: Monday, March 12, 2007 8:13 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] populating a table
Hi!
This has worked before, could anyone please tell me what's wrong?
I'm trying to create and populate a Table in my database with a script
generated with shp2pgsql.exe SQL:
BEGIN;
CREATE TABLE "public"."h1707640_cul_transl" (gid serial PRIMARY KEY,
"f_code" varchar(5),
"f_code_des" varchar(254),
"exs" int2,
"exs_descri" varchar(254),
"tile_id" int2,
"edg_id" int4,
"shape_leng" numeric);
SELECT
AddGeometryColumn('public','h1707640_cul_transl','the_geom','-1','MULTIL
INESTRING',2);
INSERT INTO "public"."h1707640_cul_transl"
("f_code","f_code_des","exs","exs_descri","tile_id","edg_id","shape_leng
",the_geom) VALUES
('AP030','Road','28','Operational','1','6','3.05816496139e004','01050000
000100000001020000000300000084F6FF3F5A8152C0580100E0D26144402C2000C05C81
52C02A2E00C0D361444007EDFF1F5F8152C055210060D2614440');
END;
I'm getting the following error message:
NOTICE: CREATE TABLE will create implicit sequence
"h1707640_cul_transl_gid_seq" for serial column
"h1707640_cul_transl.gid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"h1707640_cul_transl_pkey" for table "h1707640_cul_transl"
ERROR: function addgeometrycolumn("unknown", "unknown", "unknown",
"unknown", "unknown", integer) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You may
need to add explicit type casts.
Character: 225
Paul Malm
Saab Systems, Naval Systems Division
Tel: +46 8 580 838 22
Mobile: +46 734 373 822
________________________________
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended solely for the
addressee. If you received this in error, please contact the sender
and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070312/f71defdb/attachment.html>
More information about the postgis-users
mailing list