[Gdal-dev] PostGis layers

Oleg Semykin oss-dev at rambler.ru
Fri Sep 23 08:47:16 EDT 2005


Frank Warmerdam wrote:

> 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
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>
>  
>

Hi, Frank

But what about older PostreSQL 7.X version support:

"Unable to identify an operator '=' for types 'name' and 'varchar'
You will have to retype this query using an explicit cast"

See: http://lists.maptools.org/pipermail/gdal-dev/2005-August/006098.html





More information about the Gdal-dev mailing list