Opened 12 years ago

Closed 5 years ago

#1481 closed defect (worksforme)

v.in.ogr with postgis layers fails if the table schema is on the first place in the search_path of the database

Reported by: tomdb Owned by: grass-dev@…
Priority: normal Milestone: 7.0.7
Component: Vector Version: 6.4.1
Keywords: v.in.ogr, postgis Cc: tomdb
CPU: x86-32 Platform: Linux

Description

The command

v.in.ogr  dsn="PG:dbname=XXX user=XXX host=XXX" layer=venue.stand_lines output=lines type=boundary

fails if the schema "venue" is on the first place of the search path of the database XXX. The same command without the schema definition ( "layer=stand_lines") works fine as expected. Examples:

XXX=>ALTER DATABASE XXX set search_path = venue,public;

GRASS 6.4.1 (xy):~/grassdata/xy >v.in.ogr dsn="PG:dbname=XXX user=XXX host=localhost " layer=venue.stand_lines output=lines type=boundary --overwrite
WARNING: Vector map <lines> already exists and will be overwritten
ERROR: Layer <venue.stand_lines> not available
XXX=>ALTER DATABASE XXX set search_path = venue,public;

GRASS 6.4.1 (xy):~/grassdata/xy >v.in.ogr dsn="PG:dbname=XXX user=XXX host=localhost " layer=stand_lines output=lines type=boundary --overwrite

...works fine....
XXX=>ALTER DATABASE XXX set search_path = public,venue;

GRASS 6.4.1 (xy):~/grassdata/xy > v.in.ogr dsn="PG:dbname=XXX user=XXX host=localhost " layer=venue.stand_lines output=lines type=boundary --overwrite

...works fine....
XXX=>ALTER DATABASE XXX set search_path = venue,public;

GRASS 6.4.1 (xy):~/grassdata/xy > v.in.ogr  dsn="PG:dbname=XXX user=XXX host=localhost " layer=stand_lines output=lines type=boundary --overwrite

...works fine....
XXX=>ALTER DATABASE XXX set search_path = public;

GRASS 6.4.1 (xy):~/grassdata/xy > v.in.ogr  dsn="PG:dbname=XXX user=XXX host=localhost " layer=venue.stand_lines output=lines type=boundary --overwrite

...works fine....

Change History (7)

comment:1 by tomdb, 12 years ago

Postgres version:

XXX=> select version();
                                                      version                                                       
--------------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.4.9 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-bit

comment:2 by tomdb, 9 years ago

CPU: Unspecifiedx86-32
Keywords: v.in.ogr postgis added

Problem still present on Grass 7.0, PostgreSQL 9.3

comment:3 by tomdb, 9 years ago

Cc: tomdb added
Milestone: 7.0.0

comment:4 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:5 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:6 by neteler, 6 years ago

Milestone: 7.0.67.0.7

comment:7 by martinl, 5 years ago

Resolution: worksforme
Status: newclosed

Works in G76

Note: See TracTickets for help on using tickets.