[postgis-users] Trouble seeinglisting tables

Stephen Woodbridge woodbri at swoodbridge.com
Mon Feb 13 15:35:36 PST 2012


Right, it is always best to keep table and column names lowercase in 
postgresql. You could have accessed yout mixed case table with:

DATA 'the_geom from "Metwp100Poly" USING SRID=26919 USING Unique gid'
or maybe
DATA "the_geom from \"Metwp100Poly\" USING SRID=26919 USING Unique gid"

By default postgres assumes lowercase names you have to use " (double 
quote) character around mixed case names or names with special 
characters in them. This is generally a real pain. So it is recommented 
that you keep it all lower case.

-Steve W

On 2/13/2012 5:53 PM, Bistrais, Bob wrote:
> I think we’re out of the woods, and special thanks to TC Haddad for the
> solution…
>
> TC suggested that I check the upper/lower case of the table name. I had
> this correct, but it gave me an idea of something to try- I created a
> new table of the same shapefile, only this time the table name is all
> lower case. Using that in my map file, the map image appears correctly.
>
> Thanks everyone for their input! I’m sure it won’t be the last ou hear
> from me on PostGIS, but at least we’re off and running!
>
> BB
>
> *From: * postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] *On Behalf Of
> *pcreso at pcreso.com
> *Sent:* Monday, February 13, 2012 5:06 PM
> *To:* PostGIS Users Discussion
> *Cc:* Bistrais, Bob
> *Subject:* Re: [postgis-users] Trouble seeinglisting tables
>
> Nothing obvious that I can see.
>
>
> psql -d <db>
>
> \d # should list the tables
> \d mytable # should list the structure of the table "mytable"
> select * from mytable; # should list the contents of mytable.
>
>
> If you can post the outputs from these commands (the text before the
> "#") we can probably offer more informed advice.
>
> Cheers
>
> Brent Wood
>
>
>
> --- On *Tue, 2/14/12, Bistrais, Bob /<Bob.Bistrais at maine.gov>/* wrote:
>
>
> From: Bistrais, Bob <Bob.Bistrais at maine.gov>
> Subject: [postgis-users] Trouble seeinglisting tables
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Date: Tuesday, February 14, 2012, 9:58 AM
>
> I am having trouble on a pretty basic level. I loaded a couple
> shapefiles into PostGIS. I can see that they successfully loaded when I
> use pgAdmin. But when I go to command line, I have trouble. I can do a
> \d command and see the tables exist in the database. But if I do a
> select * from mytable; I get an errer, “relation “mytable” does not
> exist. What am I doing wrong here?
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> </mc/compose?to=postgis-users at postgis.refractions.net>
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> 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