[Gdal-dev] PostGis layers

Frank Warmerdam warmerdam at pobox.com
Thu Sep 22 15:29:34 EDT 2005


On 9/22/05, Charles F. I. Savage <cfis at interserv.com> wrote:
> Hi everyone - working with OGR and PostGis.
>
> When OGR opens a Postgis enabled database, it finds its layers via this
> query (I added the select g.f_table_name part to show a problem below):
>
> SELECT c.relname, g.f_table_name FROM pg_class c, geometry_columns g
> WHERE (c.relkind in ('r','v') AND c.relname !~ '^pg'
> AND c.relname ~ g.f_table_name)
>
> I've pasted the results of this query below.  Note that the
> polygoncorrections and polgyoneconomics layer show up twice!  This is
> caused by this part of the query:
>
> AND c.relname ~ g.f_table_name)
>
> Shouldn't it be a direct match without a regular expression, like this:
>
> AND c.relname = g.f_table_name)

Charlie,

I believe you are corrected.  I have committed this change.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list