On Sat, Apr 6, 2013 at 2:18 AM, Margie Roswell <[email protected]> wrote:

> I've been googling up a storm, now that I've got a local postgis database
> with QGIS. But still haven't figured out how to display a newly created
> table.
>
> The query I used to create the table:
> CREATE TABLE smaller_leg_final AS
> SELECT ST_Buffer(geom,-500) AS geom, legislative_final.district
> FROM legislative_final
> WHERE area > 30;
>
> I then discovered that I needed a unique ID, and did the following:
> ALTER TABLE smaller_leg_final ADD COLUMN id serial not null;
>


Why don't you try making you unique column a primary key?

ALTER TABLE smaller_leg_final
  ADD CONSTRAINT smaller_leg_final_pk PRIMARY KEY(id);

Rich
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to