[postgis-users] Win32 PostgreSQL: pgsql75win.zip replacement
Dan R Greening
greening at bigtribe.com
Tue Aug 17 08:49:54 PDT 2004
So I tried it with my test.sql code, which consists of:
CREATE TABLE poiloc (
poiid varchar(11) NOT NULL UNIQUE,
latitude DOUBLE PRECISION NOT NULL,
longitude DOUBLE PRECISION NOT NULL,
PRIMARY KEY (poiid)
);
CREATE INDEX lat_index ON poiloc (latitude,longitude);
CREATE INDEX lon_index ON poiloc (longitude,latitude);
INSERT INTO poiloc (poiid, latitude, longitude) VALUES
('27165',37.766029,-122.430382);
INSERT INTO poiloc (poiid, latitude, longitude) VALUES
('11',37.764894,-122.423022);
INSERT INTO poiloc (poiid, latitude, longitude) VALUES
('12',37.764829,-122.423882);
INSERT INTO poiloc (poiid, latitude, longitude) VALUES
('18',37.762529,-122.396481);
INSERT INTO poiloc (poiid, latitude, longitude) VALUES
('19',37.761829,-122.418282);
INSERT INTO poiloc (poiid, latitude, longitude) VALUES
('25',37.790508,-122.398332);
INSERT INTO poiloc (poiid, latitude, longitude) VALUES
('26',37.788028,-122.395281);
SELECT AddGeometryColumn(current_schema(),'poiloc','geom',-1,'POINT', 2);
UPDATE poiloc set geom = GeometryFromText('POINT(' || latitude || ' ' ||
longitude || ')', -1);
CREATE INDEX geom_idx ON poiloc USING GIST(geom gist_geometry_ops);
select poiid from poiloc where geom && GeometryFromText('BOX3D(37.76930
-122.40798,37.78929 -122.38621)',-1);
And the first SELECT fails with this error:
psql.exe:/greening/dev/poi/sql/postgres/test.sql:16: ERROR: function
addgeometrycolumn(name, "unknown", "unknown", integer, "unknown", integer)
does not exist
HINT: No function matches the given name and argument types. You may need
to add explicit type casts.
psql.exe:/greening/dev/poi/sql/postgres/test.sql:17: ERROR: column "geom"
of relation "poiloc" does not exist
psql.exe:/greening/dev/poi/sql/postgres/test.sql:18: ERROR: column "geom"
does not exist
psql.exe:/greening/dev/poi/sql/postgres/test.sql:19: ERROR: column "geom"
does not exist
gistest=#
Am I doing something wrong?
Dan Greening, Ph.D. CEO BigTribe http://dan.greening.name/contact.htm
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of Mark Cave-Ayland
> Sent: Tuesday, August 17, 2004 5:37 AM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] Win32 PostgreSQL: pgsql75win.zip replacement
>
> Hi everyone,
>
> After much testing from everyone on this mailing-list, I've
> decided to remove the pgsql75win.zip download from my
> website. My reason for doing this is that much discussion has
> been had on the PostgreSQL mailing lists about the potential
> security risk of running PostgreSQL as a user with
> administrative privileges, and now that the download is
> becoming more popular, I would not like to reponsible for
> making Windows servers vunerable for future exploits.
>
> In it's place, I have used the source from the main
> PostgreSQL Win32 installer to build a new MSI image which
> also contains PostGIS. I have altered the installer so that
> it only installs the PostgreSQL core to help keep its size
> down. The advantage of this is that the installer can
> correctly setup a new user with minimal privileges to run the
> database, so if an exploit for PostgreSQL is discovered, the
> damage can be minimised.
>
> The image can be found at: http://www.webbased.co.uk/mca/
>
> I've also used this as an excuse to update the code: PostGIS
> is taken from CVS yesterday, while PostgreSQL has been
> upgraded to 8.0 beta 1. So unfortunately you will need to
> pg_dump/pg_restore your data from pgsql75win.zip since the
> database version has changed.
>
> So again some warnings: this is really for
> development/evaluation purposes only - it's still a beta
> version, have fun, and please share any problems you find
> with PostGIS on the list. It works for me, but your mileage
> may vary. I would recommend if you have already installed the
> "official" PostgreSQL 8.0 beta that you uninstall it before
> trying this one.
>
> Finally, to get start, fire up a command prompt in
> "C:\Program Files\PostgreSQL\8.0-beta1\bin" and do:
>
> createdb.exe -U postgres gistest
> psql.exe -U postgres -d gistest
>
> \i ../share/contrib/postgis.sql
> \i ../share/contrib/spatial_ref_sys.sql
>
> ...then it's over to you :)
>
>
> Mark.
>
> ---
>
> Mark Cave-Ayland
> Webbased Ltd.
> Tamar Science Park
> Derriford
> Plymouth
> PL6 8BX
> England
>
> Tel: +44 (0)1752 764445
> Fax: +44 (0)1752 764446
>
>
> This email and any attachments are confidential to the
> intended recipient and may also be privileged. If you are not
> the intended recipient please delete it from your system and
> notify the sender. You should not copy it or use it for any
> purpose nor disclose or distribute its contents to any other person.
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list