[Qgis-user] Alternative schemas for postgis geometry_columns?

FW forkandwait at gmail.com
Mon Dec 28 09:53:07 PST 2009


Setting the search path via ALTER DATABASE seems to fix the problem
just great.  I guess I had set it via my .psqlrc and that didn't work
for a QGIS connection.

Tx!
-W

On Mon, Dec 28, 2009 at 9:24 AM, Mike Toews <mwtoews at sfu.ca> wrote:
> There are two things I can think of, both of which I haven't tested.
>
> 1. Modify your database search path to include the postgis schema by
> default:
>
> ALTER DATABASE mydatabase SET search_path=public,postgis;
>
> or
>
> 2. Create views to the two tables in the public schema (assuming you kept
> this as from the default):
>
> CREATE OR REPLACE VIEW spatial_ref_sys AS SELECT * FROM
> postgis.geometry_columns;
> CREATE OR REPLACE VIEW spatial_ref_sys AS SELECT * FROM
> postgis.geometry_columns;
>
>
> -Mike
>
> FW wrote:
>>
>> In my postgis installations, I like to keep my postgis junk in its own
>> schema (aptly named "postgis"), and then to set postgis to the last
>> element in the search path. This way you can drop the entire thing by
>> dropping the schema, you can search for functions in postgis.*, etc.
>>
>> However, when I connect QGIS to my DB, it can't find my
>> geometry_columns, spatial_ref_sys, or the fact that I have a geometry
>> type.  These are all quite visible from the psql prompt using \dT and
>> the like
>>
>> Is there a way to have QGIS look in the schema postgis for this?
>>
>> I am running 1.3.0 on freebsd, with both spatialite and postgis supported.
>>
>> Tx!
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>



More information about the Qgis-user mailing list