[postgis-users] Linebreaks in postgis.sql

Dave Blasby dblasby at refractions.net
Tue Mar 26 15:53:15 PST 2002


Tyler Mitchell wrote:
> I'm trying to run postgis.sql.  I've plpgsql install okay, but I just get a
> whack of *ABORT STATE* stuff.  It seems like I get off to bad start with
> this:
> 
> CREATE FUNCTION POSTGIS_VERSION() returns char
> as 'select \'0.6\'::char as version'
> LANGUAGE 'sql';
> 
> ERROR:  value too long for type character(1)
> psql:postgis2.sql:24: ERROR:  value too long for type character(1)

I'm not sure why you're having trouble here.  You might want to try the
CVS version (0.6 is a bit old).

What version of postgresql are you using and on what kind of machine?

I dont get your error on any of our postgresql installations.  You can
change it to:

CREATE FUNCTION POSTGIS_VERSION() returns text
as 'select \'0.6\'::text as version'
LANGUAGE 'sql';


And it should stop complaining.


The whack of "*ABORT STATE*" messages are because I put the postgis
install
script inside a transaction block so you wouldn't get a 1/2 installed,
1/2 not
installed situation.  Once an error is thrown, every statement after
that will
report an error and not execute (nor will the transaction be committed).


dave




More information about the postgis-users mailing list