[postgis-users] Trouble seeinglisting tables
Bistrais, Bob
Bob.Bistrais at maine.gov
Mon Feb 13 14:25:01 PST 2012
This is the output from \d "Metwp100Poly" (which is the real name for
mytable):
postgistest=# \d "Metwp100Poly"
Table "public.Metwp100Poly"
Column | Type | Modifiers
------------+-----------------------+-----------------------------------
--------
-------------------
gid | integer | not null default
nextval('"Metwp100Poly_gi
d_seq"'::regclass)
objectid | numeric(10,0) |
town | character varying(40) |
county | character varying(15) |
geocode | character varying(5) |
geocodenum | integer |
cntycode | character varying(2) |
land | character varying(1) |
tag | character varying(1) |
island | character varying(1) |
lurc | character varying(1) |
baxter | character varying(1) |
shape_area | numeric |
shape_len | numeric |
the_geom | geometry |
Indexes:
"Metwp100Poly_pkey" PRIMARY KEY, btree (gid)
"Metwp100Poly_the_geom_gist" gist (the_geom)
Check constraints:
"enforce_dims_the_geom" CHECK (st_ndims(the_geom) = 2)
"enforce_geotype_the_geom" CHECK (geometrytype(the_geom) =
'MULTIPOLYGON'::t
ext OR the_geom IS NULL)
"enforce_srid_the_geom" CHECK (st_srid(the_geom) = 26919)
>From the Select statement I get the item names:
postgistest=# select * from "Metwp100Poly";
gid | objectid | town | county |
geocode | g
eocodenum | cntycode | land | tag | island | lurc | baxter | shape_area
| s
hape_len |
-Then lost of blank space, have to hold down the space bar for a while,
then I get a long string of dashes, then finally the data starts showing
up.
But, if I do the select statement in pgAdmin (with table name quoted),
the data looks pretty much like I'd expect.
Does this help?
________________________________
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
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120213/2aaeb7b5/attachment.html>
More information about the postgis-users
mailing list