[GRASS-user] Vector Labels

Moritz Lennert mlennert at club.worldonline.be
Mon Mar 19 16:59:17 EDT 2007


On Mon, March 19, 2007 21:25, Markus Neteler wrote:
> On Mon, Mar 19, 2007 at 09:04:42PM +0100, Moritz Lennert wrote:
>> On Mon, March 19, 2007 20:03, Amaginary Studios wrote:
>> >
>> >> You have the ?use SQL query? box checked and nothing in the query
>> >> field. Uncheck this box.
>> >
>> > Whoops, Yes indeed.
>> >
>> > I must have accidentally selected this...
>> >
>> > However, this unfortunately does not solve my problem.
>> >
>> > I have tried multiple vector files, from tutorials, my own v.org
>> > imports and I have never been able to get the labels to work...
>> >
>> > I hope there may be some other little catch I am not picking up on...
>>
>> I think it is the fact that the column names are capitalized. If you
>> look
>> at the picture, you see that the column name is 'ELEVATION', but the
>> error
>> message is that 'elevation' is not found. Try renaming the column to
>> elevation in PostgreSQL and see what happens.
>>
>> Normally, identifier names in PostgreSQL are case insensitive, so this
>> shouldn't make any difference. I imagine the problem must be somewhere
>> in
>> the GRASS db driver.
>
> I am fairly sure that PostgreSQL column names are case *sensitive*.

>From the PostgreSQL manual:

"Identifier and key word names are case insensitive. Therefore

UPDATE MY_TABLE SET A = 5;

can equivalently be written as

uPDaTE my_TabLE SeT a = 5;"

(this hasn't changed since PostgreSQL 7.4)


A quick test:

testdb=# create table testcase (cat int, ELEVATION float, TextField
varchar(10))

testdb=# \d testcase
              Table «public.testcase»
  Colonne  |         Type          | Modificateurs
-----------+-----------------------+---------------
 cat       | integer               |
 elevation | double precision      |
 textfield | character varying(10) |
Espace logique «homepg»

testdb=# select ELEVATION from testcase;
 elevation
-----------
      15.6
(1 ligne)

testdb=# select elevation from testcase;
 elevation
-----------
      15.6
(1 ligne)


Moritz




More information about the grass-user mailing list