Thanks. The problem was that one of my table use a PostgreSQL keyword.


----- Original Message ----- From: "Kevin Neufeld" <[EMAIL PROTECTED]>
To: "PostGIS Users Discussion" <[email protected]>
Sent: Thursday, September 04, 2008 9:41 PM
Subject: Re: [postgis-users] shp2pgsql - how to avoid double quotes aroundtable name and column names


You should only have to reference your table with double quotes if your table name contains uppercase characters or is a PostgreSQL keyword. In PostgreSQL, this works, so using double quotes is not a problem:
CREATE TABLE "x"(gid serial);
SELECT * FROM x;

What is your exact command with shp2pgsql?
-- Kevin

[EMAIL PROTECTED] wrote:
Hi All,
The shp2pgsql generated sql uses double quotes around table name and column names, such as: CREATE TABLE "x" (gid serial PRIMARY KEY, "route" varchar, "jurisdicti" varchar,.... The effect is that I have to use double quotes in SQLs that access data in this table later on. For example, I have to use sql like:
 select * from "x"
 Sql without double quotes, such as below, won't work:
    select * from x
 Thanks for any help.
 cyw
------------------------------------------------------------------------

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users



_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to