[Gdal-dev] OGR and support for older PostGIS DBs?
Markus Neteler
neteler at itc.it
Thu Aug 4 12:18:38 EDT 2005
On Thu, Aug 04, 2005 at 12:58:31AM -0400, Frank Warmerdam wrote:
> On 8/3/05, Markus Neteler <neteler at itc.it> wrote:
> > label: String (0.0)
> > OGR_PG: PQexec(DECLARE OGRPGLayerReader CURSOR for SELECT "ogc_fid", AsEWKT("wkb_geometry"), "cat", "label" FROM "streams_pg" )
> > OGR_PG_NOTICE: WARNING: PerformPortalClose: portal "ogrpglayerreader" not found
>
> Markus,
>
> I applogise. This looks like the PostGIS version was improperly
> determined as 1.0 or later since the AsEWKT() is being used.
No problem, Frank.
> I tried reproducing your problem here on my postgis 0.7 install, but
> now a recent batch of changes from Oleg have completely broken
> pre-PostGIS 1.0 support.
I was updating this Italian morning, it works smoothly now for me.
Congrats to the quick fixing.
> Oleg,
>
> First postgis_lib_version() does not exist before PostGIS 1.0 so there is
> no point using it to test the version.
>
> Second, the query:
>
> hResult = PQexec(hPGConn,
> "DECLARE mycursor CURSOR for "
> "SELECT c.relname FROM pg_class c,
> geometry_columns g "
> "WHERE (c.relkind in ('r','v') AND
> c.relname !~ '^pg' "
> "AND c.relname = g.f_table_name)" );
>
> Is failing on my PostGIS 0.7 system with the error message:
>
> "Unable to identify an operator '=' for types 'name' and 'varchar'
> You will have to retype this query using an explicit cast"
>
> I'm not clear why, but clearly you are doing something PostgreSQL 8
> specific. Could you please setup a PostGIS 0.7 on PostgreSQL 7.x
> and fixup your code to be compatible. If this isn't practical, then we
> should backout your recent changes, and I can workout any other
> outstanding issues with PostGIS 0.7 support.
Apparently the problem is solved in CVS.
Thanks to you and Oleg,
Markus
More information about the Gdal-dev
mailing list