[GRASS-user] Vector Labels
Harri Kiiskinen
harkiisk at utu.fi
Tue Mar 20 08:45:59 EDT 2007
On Mon, 2007-03-19 at 21:59 +0100, Moritz Lennert wrote:
> > 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)
Yes, this example is indeed so, but consider also the following:
Koe=# create table testcase (cat int, "ELEVATION" float, "TextField" varchar(10));
CREATE TABLE
Koe=# \d testcase
Table "public.testcase"
Column | Type | Modifiers
-----------+-----------------------+-----------
cat | integer |
ELEVATION | double precision |
TextField | character varying(10) |
Koe=# select elevation from testcase;
ERROR: column "elevation" does not exist
Koe=# select "ELEVATION" from testcase;
ELEVATION
-----------
(0 rows)
So it is possible to have Uppercase names for the database objects, and
these names indeed do cause trouble when you want to use the tables from
GRASS. Been there by myself, also.
In this particular problem I'd suggest adding double quotes (") to the
gis manager. The quotes might make it through to the actual query, which
then should produce the right results.
--
Harri Kiiskinen <harri.kiiskinen at utu.fi>
More information about the grass-user
mailing list