[GRASSLIST:10396] unable to display PostGIS layer

Hi all,

I have created a PostGIS layer by v.out.ogr.

  v.out.ogr in=cr olayer=cr dsn="PG:dbname=pgis_cr" type=area
format="PostgreSQL"

Then trying to display this layer in QGIS I get the following errors:

No oid column in table ...
~
Qgis row key was not set.
public.cr (wkb_geometry) sql= is an invalid layer - not loaded

Fresh CVS GRASS & QGIS
PostGIS 1.1.1
GDAL/OGR 1.3.1

Best regards, Martin

ps: ALTER TABLE cr RENAME ogc_fid to oid; helped, but I don't like
this solution...

Hi,

thanks to Peter, problem solved. I have enabled

default_with_oids = on

in postgresql.conf.

Now it works...

Thanks again,

best regards Martin

2006/2/18, Peter Pavlicko <ppavlicko@gmail.com>:

zdravim,
je to problem Postgres-u...
qgis vyzaduje pri manipulacii s tabulkami oids, avsak standardna
instalacia postgres-u 8.1.* ju nema ako default...
skus odremovat v postgresql.conf with-oids a restartnut postgres...
a vyexportovat subor este raz a potom by to malo ficat....
pp

On 2/18/06, Martin Landa <landa.martin@gmail.com> wrote:
> Hi all,
>
> I have created a PostGIS layer by v.out.ogr.
>
> v.out.ogr in=cr olayer=cr dsn="PG:dbname=pgis_cr" type=area
> format="PostgreSQL"
>
> Then trying to display this layer in QGIS I get the following errors:
>
> No oid column in table ...
> ~
> Qgis row key was not set.
> public.cr (wkb_geometry) sql= is an invalid layer - not loaded
>
> Fresh CVS GRASS & QGIS
> PostGIS 1.1.1
> GDAL/OGR 1.3.1
>
> Best regards, Martin
>
> ps: ALTER TABLE cr RENAME ogc_fid to oid; helped, but I don't like
> this solution...
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qgis-user
>