[postgis-users] shp2pgsql - how to avoid double quotes around table name and column names

Kevin Neufeld kneufeld at refractions.net
Thu Sep 4 19:41:52 PDT 2008


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

cyw at dls.net 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
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   



More information about the postgis-users mailing list