[postgis-devel] Recent changes in PostgreSQL 8.2devel

strk at refractions.net strk at refractions.net
Sun Jul 2 14:33:58 PDT 2006


Micheal, thanks a lot for this info.
Is there a chance you can provide a patch ?
We use the USE_VERSION macro to switch between postgresql
version builds. 8.2devel should be detected as 82, so:

#if USE_VERSION >= 82
...
#else
...
#endif

Thanks in advance.

--strk;


On Sun, Jul 02, 2006 at 08:41:07AM -0600, Michael Fuhr wrote:
> A recent commit to PostgreSQL HEAD (8.2devel) changes the call
> signature of the gistentryinit() macro.  One of the parameters has
> been removed; see the bottom of the second link below for the actual
> change:
> 
> http://archives.postgresql.org/pgsql-committers/2006-06/msg00380.php
> http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gist.h.diff?r1=1.53&r2=1.54
> 
> As a result PostGIS now fails to build against 8.2devel:
> 
> lwgeom_gist.c:548:10: macro "gistentryinit" passed 7 arguments, but takes just 6
> lwgeom_gist.c:545: error: `gistentryinit' undeclared (first use in this function)
> lwgeom_gist.c:545: error: (Each undeclared identifier is reported only once
> lwgeom_gist.c:545: error: for each function it appears in.)
> lwgeom_gist.c:557:41: macro "gistentryinit" passed 7 arguments, but takes just 6
> 
> I removed the penultimate argument per the change to gistentryinit();
> the PostGIS build then succeeded and passed all tests except for a
> minor diff resulting from escape_string_warning being on (see below).
> This isn't a problem yet since 8.2 is still in development, but
> eventually this version-specific change will need attention.
> 
> Another change was made some time ago but I only recently noticed
> its impact on PostGIS.  In PostgreSQL 8.2devel escape_string_warning
> defaults to on, which causes warnings when loading lwpostgis.sql
> or lwpostgis_upgrade.sql.  For example:
> 
> psql:lwpostgis_upgrade.sql:1467: WARNING:  nonstandard use of \' in a string literal
> LINE 2:         AS 'SELECT \'1.1.3\'::text AS version'
>                    ^
> HINT:  Use '' to write quotes in strings, or use the escape string syntax (E'...').
> 
> The E'...' syntax isn't supported in versions of PostgreSQL prior
> to 8.1; a backward-compatible fix would be to replace \' with ''
> and escapes like '\n' with a function call like chr(10).  I'll take
> a closer look at this when I get a chance.
> 
> -- 
> Michael Fuhr
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel

-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the postgis-devel mailing list