[postgis-users] Geometry column does not exist?

Mark Lidstone Mark.Lidstone at bmtcordah.com
Fri Aug 8 02:32:47 PDT 2008


Hmm, just "fixed" it.  By changing the table name and column name to all
lowercase characters it works.  I'm guessing I'm missing something
fundamental to Postgresql or Postgis?

For reference the version that worked:

create table bathing_area (id varchar(30) not null primary key, name
varchar(256) not null);
select
addgeometrycolumn('public','bathing_area','location',4326,'POLYGON',2);

insert into bathing_area (id, name, location)
values ('bathing_area_a','Bathing Area A',geomfromtext('POLYGON((0.0
10.0,8.66 -5.0,-8.66 -5.0,0.0 10.0))',4326));

Notice the table name changed from "BathingArea" to "bathing_area" and
field name changed from "Location" to "location".

Many thanks, and sorry for bothering you all,

Mark Lidstone
Tel: +44 (0)23 80232222; Fax: +44 (0)23 80232891
 
BMT Cordah Ltd 
Grove House
7 Ocean Way
Ocean Village
Southampton
SO14 3TJ
 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mark
Lidstone
Sent: 08 August 2008 10:26
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Geometry column does not exist?

Hi all,

I've just spent about an hour looking for some help on this problem, but
I can't find anything useful.  Hopefully, someone on here might be able
to help?

I'm trying to create a simple table with geographic content, so I'm
doing the following:

  create table BathingArea (ID varchar(30) not null primary key, Name
varchar(256) not null);
  select AddGeometryColumn('bathingarea','Location',4326,'POLYGON',2);

Everything works fine and "select * from bathingarea;" shows the
Location field (albeit with no rows in the table) and "select * from
geometry_columns;" shows an entry pointing at the new column.

Next I try to populate the table with a sample record:

  insert into BathingArea (ID, Name, Location)
  values ('Bathingarea_A', 'Bathing area A', GeomFromText('POLYGON((0.0
10.0,8.66 -5.0, -8.66 -5.0,0.0 10.0))',4326));

But I get the following error:

  ERROR:  column "location" of relation "bathingarea" does not exist.

I'm running on PostgreSQL 8.3.3 with PostGIS 1.3.3 under Windows.

Could someone please tell me how stupid I'm being and how to get this
working?

Many thanks,

Mark Lidstone
Tel: +44 (0)23 80232222; Fax: +44 (0)23 80232891
 
BMT Cordah Ltd
Grove House
7 Ocean Way
Ocean Village
Southampton
SO14 3TJ
 


BMT Cordah Ltd.
A member of the BMT group of companies
Registered Office: Investment House, 6 Union Row, Aberdeen AB10 1DQ
Registered in Scotland No. 163413
http://www.bmtcordah.com/
http://www.bmt.org/

The contents of this e-mail and any attachments are intended only for
the use of the e-mail addressee(s) shown. If you are not that person, or
one of those persons, you are not allowed to take any action based upon
it or to copy it, forward, distribute or disclose the contents of it and
you should please delete it from your system. BMT Cordah Limited does
not accept liability for any errors or omissions in the context of this
e-mail or its attachments, which arise as a result of Internet
transmission, nor accept liability for statements which are those of the
author and not clearly made on behalf of BMT Cordah Limited.

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


BMT Cordah Ltd.
A member of the BMT group of companies
Registered Office: Investment House, 6 Union Row, Aberdeen AB10 1DQ
Registered in Scotland No. 163413
http://www.bmtcordah.com/
http://www.bmt.org/

The contents of this e-mail and any attachments are intended only for the use of the e-mail addressee(s) shown. If you are not that person, or one of those persons, you are not allowed to take any action based upon it or to copy it, forward, distribute or disclose the contents of it and you should please delete it from your system. BMT Cordah Limited does not accept liability for any errors or omissions in the context of this e-mail or its attachments, which arise as a result of Internet transmission, nor accept liability for statements which are those of the author and not clearly made on behalf of BMT Cordah Limited.




More information about the postgis-users mailing list