[postgis-users] Problem with PostGIS 1.0.0 RC1

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Sat Jan 22 07:02:11 PST 2005

Hi Markus,
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Markus Schaber
> Sent: 22 January 2005 14:32
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Problem with PostGIS 1.0.0 RC1
> Hi, Mark,
> Markus Schaber schrieb:
> > Both are implemented as small stubs that both call the same WKB 
> > parsing
> > function, but with a different "byte getting" method. In C, 
> the easiest 
> > way to do this should be a struct that includes context 
> information and 
> > a function pointer to the actual byte reading function.
> Sorry, I admit this is not the easiest way, it is in some way 
> the most 
> object oriented approach.

I think that a cast would be the easiest way as it would then only be
necessary to write a simple cast function which we can then use with WKB and
EWKB geometries. However.... I've just checked the docs and CREATE CAST does
not exist for PG 7.2. So unless we can do this by altering the catalog
tables directly then we'll have to use the stub function method to provide
compatibility for 7.2 :(

> Another way would be to simply have the parser method 
> understanding both 
> input formats, using if() or ?: to distinguish both methods of source.

Given that PostgreSQL is strongly typed, I think this is a really bad idea -
if there are two different types being fed into a function then PostgreSQL
really should be aware of it IMHO.

Kind regards,


WebBased Ltd
South West Technology Centre
Tamar Science Park
PL6 8BT 

T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk

More information about the postgis-users mailing list